about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-09-24 18:28:52 -0500
committermultiple creatures <dev@multiple-creature.party>2019-09-24 18:28:52 -0500
commitb50ab4778f7765fbc0454f5a67391438d111b9b3 (patch)
tree2295f38e4c1d23ff6d3c9f661cc31d5faf4b37f9 /app/javascript
parent3d133d164146878048d703bc608f3ad6f6506ae4 (diff)
add account limited by admin flag to api + badge
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/flavours/glitch/features/account/components/header.js3
-rw-r--r--app/javascript/flavours/glitch/styles/accounts.scss6
2 files changed, 8 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 4ff5d3b42..cd2618440 100644
--- a/app/javascript/flavours/glitch/features/account/components/header.js
+++ b/app/javascript/flavours/glitch/features/account/components/header.js
@@ -185,6 +185,7 @@ class Header extends ImmutablePureComponent {
     const displayNameHtml = { __html: account.get('display_name_html') };
     const fields          = account.get('fields');
 
+    const badge_limited   = account.get('limited') ? (<div className='account-role limited'><FormattedMessage id='account.badges.limited' defaultMessage='⏯️ Limited by admin' /></div>) : null;
     const badge_locked    = account.get('locked') ? (<div className='account-role locked'><FormattedMessage id='account.badges.locked' defaultMessage='🔒 Locked' /></div>) : null;
     const badge_froze     = account.get('froze') ? (<div className='account-role froze'><FormattedMessage id='account.badges.froze' defaultMessage='❄️ Frozen by admin' /></div>) : null;
     const badge_bot       = account.get('bot') ? (<div className='account-role bot'><FormattedMessage id='account.badges.bot' defaultMessage='Bot' /></div>) : null;
@@ -224,7 +225,7 @@ class Header extends ImmutablePureComponent {
             <h1>
               <span dangerouslySetInnerHTML={displayNameHtml} />
               <small>@{acct}</small>
-              <div className='roles'>{badge_admin}{badge_mod}{badge_froze}{badge_locked}{badge_ac}{badge_bot}{badge_gently}{badge_kobold}</div>
+              <div className='roles'>{badge_admin}{badge_mod}{badge_froze}{badge_locked}{badge_limited}{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 846cf02ee..cda4761bf 100644
--- a/app/javascript/flavours/glitch/styles/accounts.scss
+++ b/app/javascript/flavours/glitch/styles/accounts.scss
@@ -246,6 +246,12 @@
     background-color: rgba(lighten($warning-red, 12%), 0.1);
     border-color: rgba(lighten($warning-red, 12%), 0.5);
   }
+
+  &.limited {
+    color: lighten(orange, 12%);
+    background-color: rgba(lighten(orange, 12%), 0.1);
+    border-color: rgba(lighten(orange, 12%), 0.5);
+  }
 }
 
 .account__header__fields {