diff --git a/app/components/post_list/post/header/header.tsx b/app/components/post_list/post/header/header.tsx index 5f409a8d0..69a6977c6 100644 --- a/app/components/post_list/post/header/header.tsx +++ b/app/components/post_list/post/header/header.tsx @@ -4,6 +4,7 @@ import React from 'react'; import {View} from 'react-native'; +import FormattedText from '@app/components/formatted_text'; import FormattedTime from '@components/formatted_time'; import PostPriorityLabel from '@components/post_priority/post_priority_label'; import {CHANNEL, THREAD} from '@constants/screens'; @@ -63,6 +64,13 @@ const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => { opacity: 0.5, ...typography('Body', 75, 'Regular'), }, + visibleToYou: { + color: theme.centerChannelColor, + marginTop: 5, + marginLeft: 5, + opacity: 0.5, + ...typography('Body', 75, 'Regular'), + }, postPriority: { alignSelf: 'center', marginLeft: 6, @@ -121,6 +129,14 @@ const Header = (props: HeaderProps) => { style={style.time} testID='post_header.date_time' /> + {isEphemeral && ( + + )} {showPostPriority && post.metadata?.priority?.priority && ( ); } else { diff --git a/app/components/system_header/index.tsx b/app/components/system_header/index.tsx index e8f3a05a0..7c88567c7 100644 --- a/app/components/system_header/index.tsx +++ b/app/components/system_header/index.tsx @@ -22,6 +22,7 @@ type Props = { createAt: number | string | Date; isMilitaryTime: boolean; theme: Theme; + isEphemeral?: boolean; user?: UserModel; } @@ -40,22 +41,29 @@ const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => { flex: 1, flexDirection: 'row', }, + headerWithTop: { + marginTop: 10, + }, + timeContainer: { + flex: 1, + marginTop: 5, + flexDirection: 'row', + gap: 5, + }, time: { color: theme.centerChannelColor, - marginTop: 5, opacity: 0.5, - flex: 1, ...typography('Body', 75, 'Regular'), }, }; }); -const SystemHeader = ({isMilitaryTime, createAt, theme, user}: Props) => { +const SystemHeader = ({isMilitaryTime, createAt, theme, user, isEphemeral}: Props) => { const styles = getStyleSheet(theme); const userTimezone = getUserTimezone(user); return ( - + { testID='post_header.display_name' /> - + + + {isEphemeral && ( + + )} + ); }; diff --git a/assets/base/i18n/en.json b/assets/base/i18n/en.json index ca7e5c8b4..25920e387 100644 --- a/assets/base/i18n/en.json +++ b/assets/base/i18n/en.json @@ -934,6 +934,7 @@ "post_body.check_for_out_of_channel_mentions.message.one": "was mentioned but is not in the channel. Would you like to ", "post_body.commentedOn": "Commented on {name}{apostrophe} message: ", "post_body.deleted": "(message deleted)", + "post_header.visible_message": "(Only visible to you)", "post_info.auto_responder": "Automatic Reply", "post_info.bot": "Bot", "post_info.del": "Delete",