diff options
| author | lain <lain@soykaf.club> | 2020-06-24 17:50:05 +0200 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-06-24 17:50:05 +0200 |
| commit | 143da55c56a932e4e88b4959511c59f1d73d37b9 (patch) | |
| tree | 598cce65273b759d7b064fceaaab20b172d541d3 /src/components/extra_buttons/extra_buttons.js | |
| parent | 7dfa734665bbb74058e221af0f71a88b4f37936d (diff) | |
| parent | bbb91d8ae3f1c3d5374de7610e723e63121e8222 (diff) | |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma-fe into remove-twitterapi-config
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}` } } } |
