From c714eb26002b1343a64d664ad7c1282f838f39aa Mon Sep 17 00:00:00 2001
From: eugenijm <eugenijm@protonmail.com>
Date: Mon, 4 Feb 2019 05:23:10 +0300
Subject: Add admin and moderator indicators to the user card

---
 src/components/user_card_content/user_card_content.vue | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

(limited to 'src/components/user_card_content/user_card_content.vue')

diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index ce65ec2f..3c0e160c 100644
--- a/src/components/user_card_content/user_card_content.vue
+++ b/src/components/user_card_content/user_card_content.vue
@@ -19,7 +19,10 @@
           </div>
 
           <router-link class='user-screen-name' :to="userProfileLink(user)">
-            <span class="handle">@{{user.screen_name}}</span><span v-if="user.locked"><i class="icon icon-lock"></i></span>
+            <span class="handle">@{{user.screen_name}}
+              <span class="staff" v-if="user.is_admin">Admin</span>
+              <span class="staff" v-else-if="user.is_moderator">Moderator</span>
+            </span><span v-if="user.locked"><i class="icon icon-lock"></i></span>
             <span v-if="!hideUserStatsLocal && !hideBio" class="dailyAvg">{{dailyAvg}} {{ $t('user_card.per_day') }}</span>
           </router-link>
         </div>
@@ -247,6 +250,17 @@
       text-overflow: ellipsis;
       overflow: hidden;
     }
+
+    .staff {
+      border: 1px solid $admin-border-color;
+      color: $admin-color;
+      background-color: $admin-background-color;
+      line-height: 12px;
+      border-radius: 3px;
+      font-size: 12px;
+      padding: 4px 6px;
+      margin-left: 5px;
+    }
   }
 
   .user-meta {
-- 
cgit v1.2.3-70-g09d2

