Allow to configure visibility for admin and moderator badges
This commit is contained in:
parent
c714eb2600
commit
648f635429
8 changed files with 35 additions and 6 deletions
|
@ -79,6 +79,21 @@ export default {
|
|||
set (color) {
|
||||
this.$store.dispatch('setHighlight', { user: this.user.screen_name, color })
|
||||
}
|
||||
},
|
||||
visibleRole () {
|
||||
const user = this.user
|
||||
|
||||
if (!(user.role === 'admin' || user.role === 'moderator')) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
if (this.isOtherUser) {
|
||||
return user.role
|
||||
}
|
||||
|
||||
if (user.show_role) {
|
||||
return user.role
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue