aboutsummaryrefslogtreecommitdiff
path: root/src/components/extra_buttons/extra_buttons.js
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2019-08-08 10:09:07 +0000
committerShpuld Shpludson <shp@cock.li>2019-08-08 10:09:07 +0000
commit92380652feb83c6a4dde5ca3bac35ff4b409fa2d (patch)
tree110677d061355c4641d1f661f9140d86b62acca1 /src/components/extra_buttons/extra_buttons.js
parent17dc7357d5036681b346f745190204e213c0ef8c (diff)
parentd3f6b581d1bbe64d26fceae3f00e9d471ca44dfe (diff)
Merge branch 'feat/conversation-muting' into 'develop'
Add Conversation/Thread Muting See merge request pleroma/pleroma-fe!876
Diffstat (limited to 'src/components/extra_buttons/extra_buttons.js')
-rw-r--r--src/components/extra_buttons/extra_buttons.js15
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 2ec72729..8d123293 100644
--- a/src/components/extra_buttons/extra_buttons.js
+++ b/src/components/extra_buttons/extra_buttons.js
@@ -16,6 +16,18 @@ const ExtraButtons = {
this.$store.dispatch('unpinStatus', this.status.id)
.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))
}
},
computed: {
@@ -30,9 +42,6 @@ const ExtraButtons = {
},
canPin () {
return this.ownStatus && (this.status.visibility === 'public' || this.status.visibility === 'unlisted')
- },
- enabled () {
- return this.canPin || this.canDelete
}
}
}