diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-19 14:53:13 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-19 14:53:13 -0500 |
commit | 3fda862ea004c1c417a442b2a8f38a67d0535979 (patch) | |
tree | 5f5610c3b1042d46bbd5cd2e5991b511583f4c68 /app/javascript/flavours | |
parent | bc22ab034bb9bbb48fb2cc93c1a617cbcd14ff9d (diff) |
add badge to ui for locked accounts
Diffstat (limited to 'app/javascript/flavours')
-rw-r--r-- | app/javascript/flavours/glitch/features/account/components/header.js | 4 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/styles/accounts.scss | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js index 2b4adb4f5..0f03770b7 100644 --- a/app/javascript/flavours/glitch/features/account/components/header.js +++ b/app/javascript/flavours/glitch/features/account/components/header.js @@ -189,6 +189,8 @@ class Header extends ImmutablePureComponent { const content = { __html: account.get('note_emojified') }; const displayNameHtml = { __html: account.get('display_name_html') }; const fields = account.get('fields'); + + const badge_locked = account.get('locked') ? (<div className='account-role locked'><FormattedMessage id='account.badges.locked' defaultMessage='🔒 Locked' /></div>) : null; const badge_bot = account.get('bot') ? (<div className='account-role bot'><FormattedMessage id='account.badges.bot' defaultMessage='Bot' /></div>) : null; const badge_ac = account.get('adult_content') ? (<div className='account-role adult'><FormattedMessage id='account.badges.adult' defaultMessage="🔞 Adult content" /></div>) : null; const badge_gently = account.get('gently') ? (<div className='account-role gently'><FormattedMessage id='account.badges.gently' defaultMessage="Gentlies kobolds" /></div>) : null; @@ -226,7 +228,7 @@ class Header extends ImmutablePureComponent { <h1> <span dangerouslySetInnerHTML={displayNameHtml} /> <small>@{acct} {lockedIcon}</small> - <div className='roles'>{badge_admin}{badge_mod}{badge_ac}{badge_bot}{badge_gently}{badge_kobold}</div> + <div className='roles'>{badge_locked}{badge_admin}{badge_mod}{badge_ac}{badge_bot}{badge_gently}{badge_kobold}</div> </h1> </div> diff --git a/app/javascript/flavours/glitch/styles/accounts.scss b/app/javascript/flavours/glitch/styles/accounts.scss index 65c7fc80c..49236fe4c 100644 --- a/app/javascript/flavours/glitch/styles/accounts.scss +++ b/app/javascript/flavours/glitch/styles/accounts.scss @@ -234,6 +234,12 @@ background-color: rgba(lighten(orange, 33%), 0.1); border-color: rgba(lighten(orange, 33%), 0.1); } + + &.locked { + color: lighten($warning-red, 12%); + background-color: rgba(lighten($warning-red, 12%), 0.1); + border-color: rgba(lighten($warning-red, 12%), 0.5); + } } .account__header__fields { |