Revert "Add role badges to WebUI (#2096)"

This reverts commit d9a078e6d3.
This commit is contained in:
Claire 2024-01-13 12:43:25 +01:00
parent e76b7ebe89
commit a25e03dbc3
3 changed files with 4 additions and 18 deletions

View File

@ -318,11 +318,6 @@ 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} />}
@ -339,7 +334,6 @@ 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>
<div className='account__header__tabs__buttons'>

View File

@ -204,7 +204,7 @@
font-size: 12px;
line-height: 12px;
font-weight: 500;
color: $ui-secondary-color;
color: var(--user-role-accent, $ui-secondary-color);
background-color: var(--user-role-background, rgba($ui-secondary-color, 0.1));
border: 1px solid var(--user-role-border, rgba($ui-secondary-color, 0.5));

View File

@ -536,22 +536,14 @@
&__tabs {
display: flex;
align-items: flex-end;
align-items: flex-start;
justify-content: space-between;
padding: 7px 10px;
margin-top: -81px;
height: 130px;
margin-top: -55px;
gap: 8px;
overflow: hidden;
margin-inline-start: -2px; // aligns the pfp with content below
.account-role {
margin: 0 2px;
padding: 4px 0;
box-sizing: border-box;
min-width: 90px;
text-align: center;
}
&__buttons {
display: flex;
align-items: center;