Status redesign: Update visibility display (#40633)

This commit is contained in:
Echo
2026-09-21 14:39:00 +00:00
committed by GitHub
parent 6db8989712
commit b4d0f69a80
2 changed files with 16 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ import { statusLink } from './utils';
interface StatusRedesignHeaderProps {
status: Pick<
AccountStatusShape,
'id' | 'account' | 'created_at' | 'visibility'
'id' | 'account' | 'created_at' | 'visibility' | 'mentions'
>;
children?: React.ReactNode;
className?: string;
@@ -58,9 +58,20 @@ export const StatusRedesignHeader: React.FC<StatusRedesignHeaderProps> = ({
displayName = (
<FormattedMessage
id='status.header.to_followers'
defaultMessage='{displayName} to Followers'
defaultMessage='{author} to Followers {count, plural, =0 {} one {+ # other} other {+ # others}}'
description='Count is # of other people mentioned in the post'
tagName='span'
values={{ displayName }}
values={{ author: displayName, count: status.mentions.length }}
/>
);
} else if (status.visibility === 'direct') {
displayName = (
<FormattedMessage
id='status.header.message_to_me'
defaultMessage='{author} to You {count, plural, =0 {} one {+ # other} other {+ # others}}'
description='DisplayName is the author, count is # of other people mentioned in the post'
tagName='span'
values={{ author: displayName, count: status.mentions.length - 1 }}
/>
);
}

View File

@@ -1390,7 +1390,8 @@
"status.favourite": "Favorite",
"status.favourites_count": "{count, plural, one {{counter} favorite} other {{counter} favorites}}",
"status.filter": "Filter this post",
"status.header.to_followers": "{displayName} to Followers",
"status.header.message_to_me": "{author} to You {count, plural, =0 {} one {+ # other} other {+ # others}}",
"status.header.to_followers": "{author} to Followers {count, plural, =0 {} one {+ # other} other {+ # others}}",
"status.history.created": "{name} created {date}",
"status.history.edited": "{name} edited {date}",
"status.likes_count": "{count, plural, one {{counter} like} other {{counter} likes}}",