diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-05-19 10:55:50 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-05-21 03:16:51 -0500 |
commit | 46216a40300201b0d557f6ab8d3e87ba3386cfcc (patch) | |
tree | 0f04b9cc71dcca5d2277d18af456e456774cd32c /app/javascript/flavours/glitch/features | |
parent | ee83fe92f170fd5bfe2d037e3c27bc895a67073b (diff) |
show mod & admin badges in web app
Diffstat (limited to 'app/javascript/flavours/glitch/features')
-rw-r--r-- | app/javascript/flavours/glitch/features/account/components/header.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js index e3a08019c..8758c6cca 100644 --- a/app/javascript/flavours/glitch/features/account/components/header.js +++ b/app/javascript/flavours/glitch/features/account/components/header.js @@ -190,9 +190,11 @@ class Header extends ImmutablePureComponent { const displayNameHtml = { __html: account.get('display_name_html') }; const fields = account.get('fields'); const badge_bot = account.get('bot') ? (<div className='account-role bot'><FormattedMessage id='account.badges.bot' defaultMessage='Bot' /></div>) : null; - const badge_ao = account.get('adults_only') ? (<div className='account-role adults-only'><FormattedMessage id='account.badges.adults_only' defaultMessage="🔞 Adult content" /></div>) : null; - const badge_gntly_kbld = account.get('gentlies_kobolds') ? (<div className='account-role gentlies'><FormattedMessage id='account.badges.gentlies_kobolds' defaultMessage="Gentlies kobolds" /></div>) : null; - const badge_kobold = account.get('is_a_kobold') ? (<div className='account-role kobold'><FormattedMessage id='account.badges.kobold' defaultMessage="Gently the kobold" /></div>) : null; + const badge_ao = account.get('adults_only') ? (<div className='account-role adults-only'><FormattedMessage id='account.badges.adults_only' defaultMessage="🔞 Adult content" /></div>) : null; + const badge_gntly_kbld = account.get('gentlies_kobolds') ? (<div className='account-role gentlies'><FormattedMessage id='account.badges.gentlies_kobolds' defaultMessage="Gentlies kobolds" /></div>) : null; + const badge_kobold = account.get('is_a_kobold') ? (<div className='account-role kobold'><FormattedMessage id='account.badges.kobold' defaultMessage="Gently the kobold" /></div>) : null; + const badge_mod = account.get('role') == 'moderator' ? (<div className='account-role moderator'><FormattedMessage id='account.badges.moderator' defaultMessage="Moderator" /></div>) : null; + const badge_admin = account.get('role') == 'admin' ? (<div className='account-role admin'><FormattedMessage id='account.badges.admin' defaultMessage="Admin" /></div>) : null; const acct = account.get('acct').indexOf('@') === -1 && domain ? `${account.get('acct')}@${domain}` : account.get('acct'); return ( @@ -224,7 +226,7 @@ class Header extends ImmutablePureComponent { <h1> <span dangerouslySetInnerHTML={displayNameHtml} /> <small>@{acct} {lockedIcon}</small> - <div className='roles'>{badge_ao}{badge_bot}{badge_gntly_kbld}{badge_kobold}</div> + <div className='roles'>{badge_admin}{badge_mod}{badge_ao}{badge_bot}{badge_gntly_kbld}{badge_kobold}</div> </h1> </div> |