From 2bb36948198b9a0787544258bde72b4d3c6d78b0 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Fri, 31 May 2024 12:14:11 -0500 Subject: [🐴] Add labels to chats (#4293) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add labels to chat list * Add to convo header * Prevent click through on PostAlert buttons * Fix space * Fix alignment --- src/components/dms/MessagesListHeader.tsx | 107 +++++++++++++++++------------ src/components/moderation/PostAlerts.tsx | 4 +- src/screens/Messages/List/ChatListItem.tsx | 7 ++ 3 files changed, 74 insertions(+), 44 deletions(-) (limited to 'src') diff --git a/src/components/dms/MessagesListHeader.tsx b/src/components/dms/MessagesListHeader.tsx index 0a0cd20da..0aeac3628 100644 --- a/src/components/dms/MessagesListHeader.tsx +++ b/src/components/dms/MessagesListHeader.tsx @@ -22,6 +22,7 @@ import {atoms as a, useBreakpoints, useTheme, web} from '#/alf' import {ConvoMenu} from '#/components/dms/ConvoMenu' import {Bell2Off_Filled_Corner0_Rounded as BellStroke} from '#/components/icons/Bell2' import {Link} from '#/components/Link' +import {PostAlerts} from '#/components/moderation/PostAlerts' import {Text} from '#/components/Typography' const PFP_SIZE = isWeb ? 40 : 34 @@ -58,7 +59,7 @@ export let MessagesListHeader = ({ t.atoms.border_contrast_low, a.border_b, a.flex_row, - a.align_center, + a.align_start, a.gap_sm, gtTablet ? a.pl_lg : a.pl_xl, a.pr_lg, @@ -69,7 +70,7 @@ export let MessagesListHeader = ({ testID="conversationHeaderBackBtn" onPress={onPressBack} hitSlop={BACK_HITSLOP} - style={{width: 30, height: 30}} + style={{width: 30, height: 30, marginTop: isWeb ? 6 : 4}} accessibilityRole="button" accessibilityLabel={_(msg`Back`)} accessibilityHint=""> @@ -152,51 +153,71 @@ function HeaderReady({ ) return ( - <> - - - - - {displayName} - - {!isDeletedAccount && ( + + + + + + + - @{profile.handle} - {convoState.convo?.muted && ( - <> - {' '} - ·{' '} - - - )} + {displayName} - )} - - + {!isDeletedAccount && ( + + @{profile.handle} + {convoState.convo?.muted && ( + <> + {' '} + ·{' '} + + + )} + + )} + + - {isConvoActive(convoState) && ( - + )} + + + + - )} - + + ) } diff --git a/src/components/moderation/PostAlerts.tsx b/src/components/moderation/PostAlerts.tsx index 5a33bbc80..0b48b51d1 100644 --- a/src/components/moderation/PostAlerts.tsx +++ b/src/components/moderation/PostAlerts.tsx @@ -64,7 +64,9 @@ function PostLabel({ <>