Refactor: Replace all display name usage for new component (#36137)

This commit is contained in:
Echo 2025-09-17 11:00:57 +02:00 committed by GitHub
commit dfef7d9407
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 198 additions and 364 deletions

View file

@ -25,6 +25,7 @@ import StatusContent from 'mastodon/components/status_content';
import { Dropdown } from 'mastodon/components/dropdown_menu';
import { autoPlayGif } from 'mastodon/initial_state';
import { makeGetStatus } from 'mastodon/selectors';
import { LinkedDisplayName } from '@/mastodon/components/display_name';
const messages = defineMessages({
more: { id: 'status.more', defaultMessage: 'More' },
@ -139,15 +140,8 @@ export const Conversation = ({ conversation, scrollKey }) => {
menu.push({ text: intl.formatMessage(messages.delete), action: handleDelete });
const names = accounts.map(a => (
<Link to={`/@${a.get('acct')}`} key={a.get('id')} data-hover-card-account={a.get('id')}>
<bdi>
<strong
className='display-name__html'
dangerouslySetInnerHTML={{ __html: a.get('display_name_html') }}
/>
</bdi>
</Link>
const names = accounts.map((account) => (
<LinkedDisplayName displayProps={{account, variant: 'simple'}} key={account.get('id')} />
)).reduce((prev, cur) => [prev, ', ', cur]);
const handlers = {