diff options
Diffstat (limited to 'src/components/user_card_content/user_card_content.js')
| -rw-r--r-- | src/components/user_card_content/user_card_content.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/components/user_card_content/user_card_content.js b/src/components/user_card_content/user_card_content.js index 6f6d04a7..427cb32d 100644 --- a/src/components/user_card_content/user_card_content.js +++ b/src/components/user_card_content/user_card_content.js @@ -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: { |
