diff --git a/packages/pl-fe/src/components/account.tsx b/packages/pl-fe/src/components/account.tsx index 683a6baa2..9d7b70898 100644 --- a/packages/pl-fe/src/components/account.tsx +++ b/packages/pl-fe/src/components/account.tsx @@ -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 = ({ account, disabled }) => { @@ -258,6 +259,20 @@ const Account = ({ @{username} + {account.locked && ( + <> + + + {account.favicon && !disableUserProvidedMedia && ( + · + )} + + )} + {account.favicon && !disableUserProvidedMedia && ( )} @@ -325,6 +340,19 @@ const Account = ({ @{username} + {account.locked && ( + <> + + {account.favicon && !disableUserProvidedMedia && ( + · + )} + + )} + {account.favicon && !disableUserProvidedMedia && ( )} diff --git a/packages/pl-fe/src/features/ui/components/panels/user-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/user-panel.tsx index a2756f68e..f06003bf9 100644 --- a/packages/pl-fe/src/features/ui/components/panels/user-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/user-panel.tsx @@ -1,11 +1,12 @@ import React from 'react'; -import { FormattedMessage, useIntl } from 'react-intl'; +import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import { Link } from 'react-router-dom'; import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; import StillImage from 'pl-fe/components/still-image'; import Avatar from 'pl-fe/components/ui/avatar'; import HStack from 'pl-fe/components/ui/hstack'; +import Icon from 'pl-fe/components/ui/icon'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import VerificationBadge from 'pl-fe/components/verification-badge'; @@ -16,6 +17,10 @@ import { getAcct } from 'pl-fe/utils/accounts'; import { shortNumberFormat } from 'pl-fe/utils/numbers'; import { displayFqn } from 'pl-fe/utils/state'; +const messages = defineMessages({ + account_locked: { id: 'account.locked_info', defaultMessage: 'This account privacy status is set to locked. The owner manually reviews who can follow them.' }, +}); + interface IUserPanel { accountId: string; action?: JSX.Element; @@ -88,10 +93,18 @@ const UserPanel: React.FC = ({ accountId, action, badges, domain }) - + @{getAcct(account, fqn)} + + {account.locked && ( + + )}