forked from srxl/akkoma-fe
Add admin and moderator indicators to the user card
This commit is contained in:
parent
6a867f6ae3
commit
c714eb2600
3 changed files with 21 additions and 1 deletions
|
@ -2,6 +2,10 @@ $main-color: #f58d2c;
|
|||
$main-background: white;
|
||||
$darkened-background: whitesmoke;
|
||||
|
||||
$admin-color: #e87487;
|
||||
$admin-border-color: rgba(232,116,135,.5);
|
||||
$admin-background-color: rgba(232,116,135,.1);
|
||||
|
||||
$fallback--bg: #121a24;
|
||||
$fallback--fg: #182230;
|
||||
$fallback--faint: rgba(185, 185, 186, .5);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -90,6 +90,8 @@ export const parseUser = (data) => {
|
|||
output.statusnet_blocking = data.statusnet_blocking
|
||||
|
||||
output.is_local = data.is_local
|
||||
output.is_admin = data.is_admin
|
||||
output.is_moderator = data.is_moderator
|
||||
|
||||
output.follows_you = data.follows_you
|
||||
|
||||
|
|
Loading…
Reference in a new issue