diff options
| author | shpuld <shp@cock.li> | 2019-07-07 23:02:09 +0300 |
|---|---|---|
| committer | shpuld <shp@cock.li> | 2019-07-07 23:02:09 +0300 |
| commit | 7ed9d17ce745abc38a27d4994452a136357aba46 (patch) | |
| tree | 78d626fc8cea0b316440f62e5e02a1de2d66e228 /src/components/extra_buttons/extra_buttons.js | |
| parent | 54b0f9013388b24769c587abbf7ca76849ce9570 (diff) | |
Add thread muting to context menu of status
Diffstat (limited to 'src/components/extra_buttons/extra_buttons.js')
| -rw-r--r-- | src/components/extra_buttons/extra_buttons.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js index 528da301..56b2c41e 100644 --- a/src/components/extra_buttons/extra_buttons.js +++ b/src/components/extra_buttons/extra_buttons.js @@ -34,6 +34,18 @@ const ExtraButtons = { .then(() => this.$emit('onSuccess')) .catch(err => this.$emit('onError', err.error.error)) }, + muteConversation () { + this.refreshPopper() + this.$store.dispatch('muteConversation', this.status.id) + .then(() => this.$emit('onSuccess')) + .catch(err => this.$emit('onError', err.error.error)) + }, + unmuteConversation () { + this.refreshPopper() + this.$store.dispatch('unmuteConversation', this.status.id) + .then(() => this.$emit('onSuccess')) + .catch(err => this.$emit('onError', err.error.error)) + }, refreshPopper () { this.showPopper = false this.showDropDown = false @@ -54,9 +66,6 @@ const ExtraButtons = { }, canPin () { return this.ownStatus && (this.status.visibility === 'public' || this.status.visibility === 'unlisted') - }, - enabled () { - return this.canPin || this.canDelete } } } |
