Feedback when copying playlist link (#1660)

* Show message when copying playlist URL

* Move toast to after writing to clipboard
This commit is contained in:
no-comma 2021-09-06 14:39:54 +00:00 committed by GitHub
parent 1fd36582ce
commit 065fc49db0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -100,12 +100,18 @@ export default Vue.extend({
switch (method) {
case 'copyYoutube':
navigator.clipboard.writeText(youtubeUrl)
this.showToast({
message: this.$t('Share.YouTube URL copied to clipboard')
})
break
case 'openYoutube':
this.openExternalLink(youtubeUrl)
break
case 'copyInvidious':
navigator.clipboard.writeText(invidiousUrl)
this.showToast({
message: this.$t('Share.Invidious URL copied to clipboard')
})
break
case 'openInvidious':
this.openExternalLink(invidiousUrl)
@ -131,6 +137,7 @@ export default Vue.extend({
},
...mapActions([
'showToast',
'openExternalLink'
])
}