Allow to configure visibility for admin and moderator badges

This commit is contained in:
eugenijm 2019-02-04 17:03:35 +03:00
parent c714eb2600
commit 648f635429
8 changed files with 35 additions and 6 deletions

View file

@ -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: {