Skip to content
Snippets Groups Projects

Copy status link to clipboard

Merged feld requested to merge feature/copy-link into develop
All threads resolved!
@@ -5,7 +5,7 @@ const ExtraButtons = {
components: { Popover },
data: function () {
return {
statusLink: 'https://' + this.$store.state.instance.name + this.$router.resolve({ name: 'conversation', params: { id: this.status.id } })
statusLink: `https://${this.$store.state.instance.name}${this.$router.resolve({ name: 'conversation', params: { id: this.status.id } }).href}`
}
},
methods: {
@@ -36,7 +36,7 @@ const ExtraButtons = {
.catch(err => this.$emit('onError', err.error.error))
},
copyLink () {
this.$copyText(this.statusLink)
navigator.clipboard.writeText(this.statusLink)
.then(() => this.$emit('onSuccess'))
.catch(err => this.$emit('onError', err.error.error))
}
Loading