|
|
@ -16,7 +16,6 @@ const messages = defineMessages({
|
|
|
|
follow: { id: 'account.follow', defaultMessage: 'Follow' },
|
|
|
|
follow: { id: 'account.follow', defaultMessage: 'Follow' },
|
|
|
|
report: { id: 'account.report', defaultMessage: 'Report @{name}' },
|
|
|
|
report: { id: 'account.report', defaultMessage: 'Report @{name}' },
|
|
|
|
media: { id: 'account.media', defaultMessage: 'Media' },
|
|
|
|
media: { id: 'account.media', defaultMessage: 'Media' },
|
|
|
|
disclaimer: { id: 'account.disclaimer', defaultMessage: 'This user is from another instance. This number may be larger.' },
|
|
|
|
|
|
|
|
blockDomain: { id: 'account.block_domain', defaultMessage: 'Hide everything from {domain}' },
|
|
|
|
blockDomain: { id: 'account.block_domain', defaultMessage: 'Hide everything from {domain}' },
|
|
|
|
unblockDomain: { id: 'account.unblock_domain', defaultMessage: 'Unhide {domain}' },
|
|
|
|
unblockDomain: { id: 'account.unblock_domain', defaultMessage: 'Unhide {domain}' },
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -68,7 +67,19 @@ export default class ActionBar extends React.PureComponent {
|
|
|
|
|
|
|
|
|
|
|
|
if (account.get('acct') !== account.get('username')) {
|
|
|
|
if (account.get('acct') !== account.get('username')) {
|
|
|
|
const domain = account.get('acct').split('@')[1];
|
|
|
|
const domain = account.get('acct').split('@')[1];
|
|
|
|
extraInfo = <abbr title={intl.formatMessage(messages.disclaimer)}>*</abbr>;
|
|
|
|
|
|
|
|
|
|
|
|
extraInfo = (
|
|
|
|
|
|
|
|
<div className='account__disclaimer'>
|
|
|
|
|
|
|
|
<FormattedMessage
|
|
|
|
|
|
|
|
id='account.disclaimer_full'
|
|
|
|
|
|
|
|
defaultMessage="Information below may reflect the user's profile incompletely."
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
{' '}
|
|
|
|
|
|
|
|
<a target='_blank' rel='noopener' href={account.get('url')}>
|
|
|
|
|
|
|
|
<FormattedMessage id='account.view_full_profile' defaultMessage='View full profile' />
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
menu.push(null);
|
|
|
|
menu.push(null);
|
|
|
|
|
|
|
|
|
|
|
@ -80,6 +91,9 @@ export default class ActionBar extends React.PureComponent {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
{extraInfo}
|
|
|
|
|
|
|
|
|
|
|
|
<div className='account__action-bar'>
|
|
|
|
<div className='account__action-bar'>
|
|
|
|
<div className='account__action-bar-dropdown'>
|
|
|
|
<div className='account__action-bar-dropdown'>
|
|
|
|
<DropdownMenu items={menu} icon='bars' size={24} direction='right' />
|
|
|
|
<DropdownMenu items={menu} icon='bars' size={24} direction='right' />
|
|
|
@ -88,20 +102,21 @@ export default class ActionBar extends React.PureComponent {
|
|
|
|
<div className='account__action-bar-links'>
|
|
|
|
<div className='account__action-bar-links'>
|
|
|
|
<Link className='account__action-bar__tab' to={`/accounts/${account.get('id')}`}>
|
|
|
|
<Link className='account__action-bar__tab' to={`/accounts/${account.get('id')}`}>
|
|
|
|
<span><FormattedMessage id='account.posts' defaultMessage='Posts' /></span>
|
|
|
|
<span><FormattedMessage id='account.posts' defaultMessage='Posts' /></span>
|
|
|
|
<strong><FormattedNumber value={account.get('statuses_count')} /> {extraInfo}</strong>
|
|
|
|
<strong><FormattedNumber value={account.get('statuses_count')} /></strong>
|
|
|
|
</Link>
|
|
|
|
</Link>
|
|
|
|
|
|
|
|
|
|
|
|
<Link className='account__action-bar__tab' to={`/accounts/${account.get('id')}/following`}>
|
|
|
|
<Link className='account__action-bar__tab' to={`/accounts/${account.get('id')}/following`}>
|
|
|
|
<span><FormattedMessage id='account.follows' defaultMessage='Follows' /></span>
|
|
|
|
<span><FormattedMessage id='account.follows' defaultMessage='Follows' /></span>
|
|
|
|
<strong><FormattedNumber value={account.get('following_count')} /> {extraInfo}</strong>
|
|
|
|
<strong><FormattedNumber value={account.get('following_count')} /></strong>
|
|
|
|
</Link>
|
|
|
|
</Link>
|
|
|
|
|
|
|
|
|
|
|
|
<Link className='account__action-bar__tab' to={`/accounts/${account.get('id')}/followers`}>
|
|
|
|
<Link className='account__action-bar__tab' to={`/accounts/${account.get('id')}/followers`}>
|
|
|
|
<span><FormattedMessage id='account.followers' defaultMessage='Followers' /></span>
|
|
|
|
<span><FormattedMessage id='account.followers' defaultMessage='Followers' /></span>
|
|
|
|
<strong><FormattedNumber value={account.get('followers_count')} /> {extraInfo}</strong>
|
|
|
|
<strong><FormattedNumber value={account.get('followers_count')} /></strong>
|
|
|
|
</Link>
|
|
|
|
</Link>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|