|
|
@ -370,16 +370,33 @@ class Header extends ImmutablePureComponent {
|
|
|
|
const acct = isLocal && domain ? `${account.get('acct')}@${domain}` : account.get('acct');
|
|
|
|
const acct = isLocal && domain ? `${account.get('acct')}@${domain}` : account.get('acct');
|
|
|
|
const isIndexable = !account.get('noindex');
|
|
|
|
const isIndexable = !account.get('noindex');
|
|
|
|
|
|
|
|
|
|
|
|
let badge;
|
|
|
|
const badges = [];
|
|
|
|
|
|
|
|
|
|
|
|
if (account.get('bot')) {
|
|
|
|
if (account.get('bot')) {
|
|
|
|
badge = (<div className='account-role bot'><FormattedMessage id='account.badges.bot' defaultMessage='Automated' /></div>);
|
|
|
|
badges.push(
|
|
|
|
|
|
|
|
<div key='bot-badge' className='account-role bot'>
|
|
|
|
|
|
|
|
<Icon id='cogs' /> { ' ' }
|
|
|
|
|
|
|
|
<FormattedMessage id='account.badges.bot' defaultMessage='Automated' />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
);
|
|
|
|
} else if (account.get('group')) {
|
|
|
|
} else if (account.get('group')) {
|
|
|
|
badge = (<div className='account-role group'><FormattedMessage id='account.badges.group' defaultMessage='Group' /></div>);
|
|
|
|
badges.push(
|
|
|
|
} else {
|
|
|
|
<div key='group-badge' className='account-role group'>
|
|
|
|
badge = null;
|
|
|
|
<Icon id='users' /> { ' ' }
|
|
|
|
|
|
|
|
<FormattedMessage id='account.badges.group' defaultMessage='Group' />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
account.get('roles', []).forEach((role) => {
|
|
|
|
|
|
|
|
badges.push(
|
|
|
|
|
|
|
|
<div key={`role-badge-${role.get('id')}`} className={`account-role user-role-${account.getIn(['roles', 0, 'id'])}`}>
|
|
|
|
|
|
|
|
<Icon id='circle' /> { ' ' }
|
|
|
|
|
|
|
|
<span>{role.get('name')} ({domain})</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div className={classNames('account__header', { inactive: !!account.get('moved') })} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>
|
|
|
|
<div className={classNames('account__header', { inactive: !!account.get('moved') })} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave}>
|
|
|
|
{!(suspended || hidden || account.get('moved')) && account.getIn(['relationship', 'requested_by']) && <FollowRequestNoteContainer account={account} />}
|
|
|
|
{!(suspended || hidden || account.get('moved')) && account.getIn(['relationship', 'requested_by']) && <FollowRequestNoteContainer account={account} />}
|
|
|
@ -414,13 +431,19 @@ class Header extends ImmutablePureComponent {
|
|
|
|
|
|
|
|
|
|
|
|
<div className='account__header__tabs__name'>
|
|
|
|
<div className='account__header__tabs__name'>
|
|
|
|
<h1>
|
|
|
|
<h1>
|
|
|
|
<span dangerouslySetInnerHTML={displayNameHtml} /> {badge}
|
|
|
|
<span dangerouslySetInnerHTML={displayNameHtml} />
|
|
|
|
<small>
|
|
|
|
<small>
|
|
|
|
<span>@{acct}</span> {lockedIcon}
|
|
|
|
<span>@{acct}</span> {lockedIcon}
|
|
|
|
</small>
|
|
|
|
</small>
|
|
|
|
</h1>
|
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{badges.length > 0 && (
|
|
|
|
|
|
|
|
<div className='account__header__badges'>
|
|
|
|
|
|
|
|
{badges}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
|
|
{!(suspended || hidden) && (
|
|
|
|
{!(suspended || hidden) && (
|
|
|
|
<div className='account__header__extra'>
|
|
|
|
<div className='account__header__extra'>
|
|
|
|
<div className='account__header__bio' ref={this.setRef}>
|
|
|
|
<div className='account__header__bio' ref={this.setRef}>
|
|
|
|