Skip to content

Commit

Permalink
Revert "Add role badges to WebUI (#2096)"
Browse files Browse the repository at this point in the history
This reverts commit d9a078e.
  • Loading branch information
ClearlyClaire committed Jan 13, 2024
1 parent e76b7eb commit a25e03d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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} />}
Expand All @@ -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'>
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/flavours/glitch/styles/accounts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
14 changes: 3 additions & 11 deletions app/javascript/flavours/glitch/styles/components/accounts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a25e03d

Please sign in to comment.