- {unread && (
-
- )}
-
+
{uploads.map((upload) => (
{
/>
))}
+ {unread && (
+
+ )}
void;
onMarkAsReadButtonClick: () => void;
};
-const UnreadMessagesIndicator = ({
- count,
- since,
- onJumpButtonClick,
- onMarkAsReadButtonClick,
-}: UnreadMessagesIndicatorProps): ReactElement => {
+const indicatorStyle = css`
+ position: absolute;
+ top: 8px;
+ left: 50%;
+ translate: -50%;
+ z-index: 1;
+`;
+
+const UnreadMessagesIndicator = ({ count, onJumpButtonClick, onMarkAsReadButtonClick }: UnreadMessagesIndicatorProps): ReactElement => {
const t = useTranslation();
- const formatTimeAgo = useTimeAgo();
return (
-
-
- {t('Jump_to_first_unread')}
-
- {t('S_new_messages_since_s', count, since ? formatTimeAgo(since) : undefined)}
-
- {t('Mark_as_read')}
-
-
+
+
+ {t('S_unread_messages', count)}
+
+
);
};
diff --git a/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json b/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json
index 4eff46efc579a..c16658c67ec26 100644
--- a/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json
+++ b/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json
@@ -4488,6 +4488,7 @@
"Running_Instances": "Running Instances",
"Runtime_Environment": "Runtime Environment",
"S_new_messages_since_s": "%s new messages since %s",
+ "S_new_messages": "%s new messages",
"Same_As_Token_Sent_Via": "Same as \"Token Sent Via\"",
"Same_Style_For_Mentions": "Same style for mentions",
"SAML": "SAML",
@@ -5363,6 +5364,7 @@
"Unread_Count_DM": "Unread Count for Direct Messages",
"Unread_Count_Omni": "Unread Count for Omnichannel Chats",
"Unread_Messages": "Unread Messages",
+ "S_unread_messages": "%s unread messages",
"Unread_on_top": "Unread on top",
"Unread_Rooms": "Unread Rooms",
"Unread_Rooms_Mode": "Unread Rooms Mode",
diff --git a/yarn.lock b/yarn.lock
index 93ace4f75e010..5953649266f6b 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -9147,6 +9147,18 @@ __metadata:
languageName: node
linkType: hard
+"@rocket.chat/fuselage-hooks@npm:^0.33.0":
+ version: 0.33.0
+ resolution: "@rocket.chat/fuselage-hooks@npm:0.33.0"
+ dependencies:
+ use-sync-external-store: ~1.2.0
+ peerDependencies:
+ "@rocket.chat/fuselage-tokens": "*"
+ react: ^17.0.2
+ checksum: addf78db893c3185d4d5fc347e1aa81710e0939505a08db77e524740d05555c5e8556d2b6f0e6425270621bdd7230d13278add77ce38197c048af30207cce853
+ languageName: node
+ linkType: hard
+
"@rocket.chat/fuselage-polyfills@npm:~0.31.25":
version: 0.31.25
resolution: "@rocket.chat/fuselage-polyfills@npm:0.31.25"