pl-fe: show locked account icon in more places when appropriate

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2025-10-13 13:33:12 +02:00
parent 3b77acbff0
commit 692dd5771e
2 changed files with 43 additions and 2 deletions

View File

@ -33,6 +33,7 @@ interface IInstanceFavicon {
const messages = defineMessages({
bot: { id: 'account.badges.bot', defaultMessage: 'Bot' },
timeline: { id: 'account.instance_favicon', defaultMessage: 'Visit {domain} timeline' },
account_locked: { id: 'account.locked_info', defaultMessage: 'This account privacy status is set to locked. The owner manually reviews who can follow them.' },
});
const InstanceFavicon: React.FC<IInstanceFavicon> = ({ account, disabled }) => {
@ -258,6 +259,20 @@ const Account = ({
<HStack alignItems='center' space={1}>
<Text theme='muted' size='sm' direction='ltr' truncate>@{username}</Text>
{account.locked && (
<>
<Icon
src={require('@phosphor-icons/core/regular/lock.svg')}
alt={intl.formatMessage(messages.account_locked)}
className='size-4 text-gray-600'
/>
{account.favicon && !disableUserProvidedMedia && (
<Text tag='span' theme='muted' size='sm'>&middot;</Text>
)}
</>
)}
{account.favicon && !disableUserProvidedMedia && (
<InstanceFavicon account={account} disabled />
)}
@ -325,6 +340,19 @@ const Account = ({
<HStack alignItems='center' space={1}>
<Text theme='muted' size='sm' direction='ltr' truncate>@{username}</Text>
{account.locked && (
<>
<Icon
src={require('@phosphor-icons/core/regular/lock.svg')}
alt={intl.formatMessage(messages.account_locked)}
className='size-4 text-gray-600'
/>
{account.favicon && !disableUserProvidedMedia && (
<Text tag='span' theme='muted' size='sm'>&middot;</Text>
)}
</>
)}
{account.favicon && !disableUserProvidedMedia && (
<InstanceFavicon account={account} disabled={!withLinkToProfile} />
)}