diff options
| author | Shpuld Shpludson <shp@cock.li> | 2020-05-12 17:36:05 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2020-05-12 17:36:05 +0000 |
| commit | 5d49edc823ba2ea3e34d4fd6c5efcc84ef9712f7 (patch) | |
| tree | f4a7a9c10d00083b36fb331c1d9196dc391dcfc7 /src/components/extra_buttons/extra_buttons.js | |
| parent | a0f780c4550b77d4574e0de8932a2dff288784a3 (diff) | |
| parent | 0bc0a8d5f51f88858a7347b915361c45ff819292 (diff) | |
Merge branch 'rc/2.0.5' into 'master'
Update MASTER for 2.0.5 patch
See merge request pleroma/pleroma-fe!1105
Diffstat (limited to 'src/components/extra_buttons/extra_buttons.js')
| -rw-r--r-- | src/components/extra_buttons/extra_buttons.js | 8 |
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}` } } } |
