From c3e510788298a79e2886dd6ef2e9ce5630c89eba Mon Sep 17 00:00:00 2001 From: Hailey Date: Thu, 17 Oct 2024 09:42:19 -0700 Subject: Move self-label button (#5780) * move self label button? * rm * make sure its usable on large font sizes * tweak wording * update icon * tweaks * change button label and change opacity when no media (#5794) * Tweak it moar (#5807) * Tweak it moar * Pluralize * Labels --------- Co-authored-by: Samuel Newman Co-authored-by: Eric Bailey --- src/view/com/composer/Composer.tsx | 114 ++++++++++----------- src/view/com/composer/labels/LabelsBtn.tsx | 44 +++++--- src/view/com/composer/threadgate/ThreadgateBtn.tsx | 43 ++++---- 3 files changed, 106 insertions(+), 95 deletions(-) (limited to 'src') diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx index 2f28b9665..126addd1c 100644 --- a/src/view/com/composer/Composer.tsx +++ b/src/view/com/composer/Composer.tsx @@ -13,6 +13,7 @@ import { Keyboard, KeyboardAvoidingView, LayoutChangeEvent, + ScrollView, StyleProp, StyleSheet, View, @@ -559,45 +560,30 @@ export const ComposePost = ({ + ) : canPost ? ( + ) : ( - - { - dispatch({type: 'update_labels', labels: nextLabels}) - }} - hasMedia={hasMedia || Boolean(extLink)} - /> - {canPost ? ( - - ) : ( - - - Post - - - )} + + + Post + )} @@ -758,22 +744,38 @@ export const ComposePost = ({ - {replyTo ? null : ( - { - dispatch({type: 'update_postgate', postgate: nextPostgate}) - }} - threadgateAllowUISettings={draft.threadgate} - onChangeThreadgateAllowUISettings={nextThreadgate => { - dispatch({ - type: 'update_threadgate', - threadgate: nextThreadgate, - }) - }} - style={bottomBarAnimatedStyle} - /> - )} + + + {replyTo ? null : ( + { + dispatch({type: 'update_postgate', postgate: nextPostgate}) + }} + threadgateAllowUISettings={draft.threadgate} + onChangeThreadgateAllowUISettings={nextThreadgate => { + dispatch({ + type: 'update_threadgate', + threadgate: nextThreadgate, + }) + }} + style={bottomBarAnimatedStyle} + /> + )} + { + dispatch({type: 'update_labels', labels: nextLabels}) + }} + hasMedia={hasMedia || Boolean(extLink)} + /> + + void }) { const control = Dialog.useDialogControl() - const t = useTheme() const {_} = useLingui() const hasLabel = labels.length > 0 @@ -52,20 +52,33 @@ export function LabelsBtn({ return ( <> @@ -114,7 +127,8 @@ function DialogInner({ ) : ( - There are no self-labels that can be applied to this post. + No self-labels can be applied to this post because it contains + no media. )} @@ -235,7 +249,7 @@ function DialogInner({ - + - + { -- cgit 1.4.1