1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-11 21:29:13 +09:00

Display isAdmin badge

This commit is contained in:
syuilo 2018-05-21 14:47:21 +09:00
parent 9677d1288a
commit 140249172c
2 changed files with 12 additions and 0 deletions

View File

@ -16,6 +16,7 @@
<div class="main"> <div class="main">
<header> <header>
<router-link class="name" :to="p.user | userPage" v-user-preview="p.user.id">{{ p.user | userName }}</router-link> <router-link class="name" :to="p.user | userPage" v-user-preview="p.user.id">{{ p.user | userName }}</router-link>
<span class="is-admin" v-if="p.user.isAdmin">admin</span>
<span class="is-bot" v-if="p.user.isBot">bot</span> <span class="is-bot" v-if="p.user.isBot">bot</span>
<span class="is-cat" v-if="p.user.isCat">cat</span> <span class="is-cat" v-if="p.user.isCat">cat</span>
<span class="username"><mk-acct :user="p.user"/></span> <span class="username"><mk-acct :user="p.user"/></span>
@ -431,6 +432,7 @@ root(isDark)
&:hover &:hover
text-decoration underline text-decoration underline
> .is-admin
> .is-bot > .is-bot
> .is-cat > .is-cat
margin 0 .5em 0 0 margin 0 .5em 0 0
@ -440,6 +442,10 @@ root(isDark)
border solid 1px isDark ? #57616f : #ddd border solid 1px isDark ? #57616f : #ddd
border-radius 3px border-radius 3px
&.is-admin
border-color isDark ? #d42c41 : #f56a7b
color isDark ? #d42c41 : #f56a7b
> .username > .username
margin 0 .5em 0 0 margin 0 .5em 0 0
overflow hidden overflow hidden

View File

@ -17,6 +17,7 @@
<header> <header>
<mk-avatar class="avatar" :user="p.user" v-if="$store.state.device.postStyle == 'smart'"/> <mk-avatar class="avatar" :user="p.user" v-if="$store.state.device.postStyle == 'smart'"/>
<router-link class="name" :to="p.user | userPage">{{ p.user | userName }}</router-link> <router-link class="name" :to="p.user | userPage">{{ p.user | userName }}</router-link>
<span class="is-admin" v-if="p.user.isAdmin">admin</span>
<span class="is-bot" v-if="p.user.isBot">bot</span> <span class="is-bot" v-if="p.user.isBot">bot</span>
<span class="is-cat" v-if="p.user.isCat">cat</span> <span class="is-cat" v-if="p.user.isCat">cat</span>
<span class="username"><mk-acct :user="p.user"/></span> <span class="username"><mk-acct :user="p.user"/></span>
@ -387,6 +388,7 @@ root(isDark)
&:hover &:hover
text-decoration underline text-decoration underline
> .is-admin
> .is-bot > .is-bot
> .is-cat > .is-cat
margin 0 0.5em 0 0 margin 0 0.5em 0 0
@ -396,6 +398,10 @@ root(isDark)
border solid 1px isDark ? #57616f : #ddd border solid 1px isDark ? #57616f : #ddd
border-radius 3px border-radius 3px
&.is-admin
border-color isDark ? #d42c41 : #f56a7b
color isDark ? #d42c41 : #f56a7b
> .username > .username
margin 0 0.5em 0 0 margin 0 0.5em 0 0
overflow hidden overflow hidden