diff --git a/app/javascript/mastodon/components/display_name.tsx b/app/javascript/mastodon/components/display_name.tsx index 8409244827..c2472e40c8 100644 --- a/app/javascript/mastodon/components/display_name.tsx +++ b/app/javascript/mastodon/components/display_name.tsx @@ -2,6 +2,8 @@ import React from 'react'; import type { List } from 'immutable'; +import LockIcon from '@/material-icons/400-24px/lock.svg?react'; +import { Icon } from 'mastodon/components/icon'; import type { Account } from 'mastodon/models/account'; import { autoPlayGif } from '../initial_state'; @@ -12,6 +14,7 @@ interface Props { account?: Account; others?: List; localDomain?: string; + showLocked?: boolean; } export class DisplayName extends React.PureComponent { @@ -48,7 +51,7 @@ export class DisplayName extends React.PureComponent { }; render() { - const { others, localDomain } = this.props; + const { others, localDomain, showLocked } = this.props; let displayName: React.ReactNode, suffix: React.ReactNode, @@ -93,7 +96,14 @@ export class DisplayName extends React.PureComponent { /> ); - suffix = @{acct}; + suffix = ( + + @{acct} + {showLocked && account.get('locked') && ( + + )} + + ); } else { displayName = ( diff --git a/app/javascript/mastodon/components/hover_card_account.tsx b/app/javascript/mastodon/components/hover_card_account.tsx index 05033e4ac7..4d91c8ead7 100644 --- a/app/javascript/mastodon/components/hover_card_account.tsx +++ b/app/javascript/mastodon/components/hover_card_account.tsx @@ -51,7 +51,11 @@ export const HoverCardAccount = forwardRef< <> - +