Add role badges to WebUI (#2096)
* [Glitch] Add role badges to WebUI Signed-off-by: Claire <claire.github-309c@sitedethib.com> * [Glitch] Ensure role name remains readable Signed-off-by: Claire <claire.github-309c@sitedethib.com> Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@ -321,6 +321,11 @@ class Header extends ImmutablePureComponent {
|
||||
badge = null;
|
||||
}
|
||||
|
||||
let role = null;
|
||||
if (account.getIn(['roles', 0])) {
|
||||
role = (<div key='role' className={`account-role user-role-${account.getIn(['roles', 0, 'id'])}`}>{account.getIn(['roles', 0, 'name'])}</div>);
|
||||
}
|
||||
|
||||
return (
|
||||
<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} />}
|
||||
@ -337,6 +342,7 @@ class Header extends ImmutablePureComponent {
|
||||
<div className='account__header__tabs'>
|
||||
<a className='avatar' href={account.get('avatar')} rel='noopener noreferrer' target='_blank' onClick={this.handleAvatarClick}>
|
||||
<Avatar account={suspended || hidden ? undefined : account} size={90} />
|
||||
{role}
|
||||
</a>
|
||||
|
||||
{!suspended && (
|
||||
|
Reference in New Issue
Block a user