aboutsummaryrefslogtreecommitdiff
path: root/src/components/extra_buttons/extra_buttons.js
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2020-05-08 08:35:30 +0000
committerShpuld Shpludson <shp@cock.li>2020-05-08 08:35:30 +0000
commit1186205583715b187bb4e503dc35e8c0644cfc7e (patch)
treec439d51bcc3a5a972fc763ab96ade4cee9bed7a1 /src/components/extra_buttons/extra_buttons.js
parent8b1aa593a46869ac1ea26de8a1f31d9fa2f44e56 (diff)
parent921eedfd84007da72619a553ba8d074076559e7a (diff)
Merge branch 'develop' into 'feat/relationship-refactor'
# Conflicts: # src/components/notification/notification.js
Diffstat (limited to 'src/components/extra_buttons/extra_buttons.js')
-rw-r--r--src/components/extra_buttons/extra_buttons.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js
index 37485383..e4b19d01 100644
--- a/src/components/extra_buttons/extra_buttons.js
+++ b/src/components/extra_buttons/extra_buttons.js
@@ -29,6 +29,11 @@ const ExtraButtons = {
this.$store.dispatch('unmuteConversation', this.status.id)
.then(() => this.$emit('onSuccess'))
.catch(err => this.$emit('onError', err.error.error))
+ },
+ copyLink () {
+ navigator.clipboard.writeText(this.statusLink)
+ .then(() => this.$emit('onSuccess'))
+ .catch(err => this.$emit('onError', err.error.error))
}
},
computed: {
@@ -46,6 +51,9 @@ const ExtraButtons = {
},
canMute () {
return !!this.currentUser
+ },
+ statusLink () {
+ return `${this.$store.state.instance.server}${this.$router.resolve({ name: 'conversation', params: { id: this.status.id } }).href}`
}
}
}