mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-20 03:25:17 +01:00
Add links and hover cards for reports
This commit is contained in:
parent
2a704add90
commit
42bd81bd0c
@ -1,6 +1,7 @@
|
|||||||
import { FormattedMessage, useIntl, defineMessages } from 'react-intl';
|
import { FormattedMessage, useIntl, defineMessages } from 'react-intl';
|
||||||
|
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
import FlagIcon from '@/material-icons/400-24px/flag-fill.svg?react';
|
import FlagIcon from '@/material-icons/400-24px/flag-fill.svg?react';
|
||||||
import { Icon } from 'mastodon/components/icon';
|
import { Icon } from 'mastodon/components/icon';
|
||||||
@ -44,16 +45,26 @@ export const NotificationAdminReport: React.FC<{
|
|||||||
|
|
||||||
const values = {
|
const values = {
|
||||||
name: (
|
name: (
|
||||||
<bdi
|
<Link
|
||||||
dangerouslySetInnerHTML={{ __html: account.get('display_name_html') }}
|
to={`/@${account.acct}`}
|
||||||
/>
|
title={`@${account.acct}`}
|
||||||
|
data-hover-card-account={account.id}
|
||||||
|
>
|
||||||
|
<bdi dangerouslySetInnerHTML={{ __html: account.display_name_html }} />
|
||||||
|
</Link>
|
||||||
),
|
),
|
||||||
target: (
|
target: (
|
||||||
<bdi
|
<Link
|
||||||
dangerouslySetInnerHTML={{
|
to={`/@${targetAccount.acct}`}
|
||||||
__html: targetAccount.get('display_name_html'),
|
title={`@${targetAccount.acct}`}
|
||||||
}}
|
data-hover-card-account={targetAccount.id}
|
||||||
/>
|
>
|
||||||
|
<bdi
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: targetAccount.display_name_html,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Link>
|
||||||
),
|
),
|
||||||
category: intl.formatMessage(messages[report.category]),
|
category: intl.formatMessage(messages[report.category]),
|
||||||
count: report.status_ids.length,
|
count: report.status_ids.length,
|
||||||
|
Loading…
Reference in New Issue
Block a user