Merge branch '645' into 'develop'

Show "Mute Conversation" menu item and three dot button to users and only if needed

Closes #645

See merge request pleroma/pleroma-fe!922
This commit is contained in:
Shpuld Shpludson 2019-08-21 04:56:38 +00:00
commit d7647be812
2 changed files with 6 additions and 2 deletions

View file

@ -40,6 +40,9 @@ const ExtraButtons = {
}, },
canPin () { canPin () {
return this.ownStatus && (this.status.visibility === 'public' || this.status.visibility === 'unlisted') return this.ownStatus && (this.status.visibility === 'public' || this.status.visibility === 'unlisted')
},
canMute () {
return !!this.currentUser
} }
} }
} }

View file

@ -1,5 +1,6 @@
<template> <template>
<v-popover <v-popover
v-if="canDelete || canMute || canPin"
trigger="click" trigger="click"
placement="top" placement="top"
class="extra-button-popover" class="extra-button-popover"
@ -9,14 +10,14 @@
<div slot="popover"> <div slot="popover">
<div class="dropdown-menu"> <div class="dropdown-menu">
<button <button
v-if="!status.muted" v-if="canMute && !status.muted"
class="dropdown-item dropdown-item-icon" class="dropdown-item dropdown-item-icon"
@click.prevent="muteConversation" @click.prevent="muteConversation"
> >
<i class="icon-eye-off" /><span>{{ $t("status.mute_conversation") }}</span> <i class="icon-eye-off" /><span>{{ $t("status.mute_conversation") }}</span>
</button> </button>
<button <button
v-if="status.muted" v-if="canMute && status.muted"
class="dropdown-item dropdown-item-icon" class="dropdown-item dropdown-item-icon"
@click.prevent="unmuteConversation" @click.prevent="unmuteConversation"
> >