diff options
| author | taehoon <th.dev91@gmail.com> | 2019-08-20 16:55:42 -0400 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-08-20 16:55:42 -0400 |
| commit | 92a0c475f796989098bf84c813900c0fd89da7d0 (patch) | |
| tree | cc8dbeaa6a16ff25e8a641bbf5885562fcc6a5a9 | |
| parent | 6504d8ca0ffaad9509fbbf3fc610d4a15538aead (diff) | |
hide mute conversation button to guests
| -rw-r--r-- | src/components/extra_buttons/extra_buttons.js | 3 | ||||
| -rw-r--r-- | src/components/extra_buttons/extra_buttons.vue | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js index 2d05ad39..5ac73e97 100644 --- a/src/components/extra_buttons/extra_buttons.js +++ b/src/components/extra_buttons/extra_buttons.js @@ -40,6 +40,9 @@ const ExtraButtons = { }, canPin () { return this.ownStatus && (this.status.visibility === 'public' || this.status.visibility === 'unlisted') + }, + canMute () { + return !!this.currentUser } } } diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue index 564d34df..1b48540e 100644 --- a/src/components/extra_buttons/extra_buttons.vue +++ b/src/components/extra_buttons/extra_buttons.vue @@ -9,14 +9,14 @@ <div slot="popover"> <div class="dropdown-menu"> <button - v-if="!status.muted" + v-if="canMute && !status.muted" class="dropdown-item dropdown-item-icon" @click.prevent="muteConversation" > <i class="icon-eye-off" /><span>{{ $t("status.mute_conversation") }}</span> </button> <button - v-if="status.muted" + v-if="canMute && status.muted" class="dropdown-item dropdown-item-icon" @click.prevent="unmuteConversation" > |
