Added toast to new share button

This commit is contained in:
kyle.watson 2020-06-27 16:22:27 +01:00
parent f31bf4f881
commit ee1d8f3c8a
2 changed files with 7 additions and 1 deletions

3
package-lock.json generated
View File

@ -17571,7 +17571,8 @@
}, },
"minimist": { "minimist": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
"dev": true "dev": true
}, },
"schema-utils": { "schema-utils": {

View File

@ -2,6 +2,7 @@ import Vue from 'vue'
import FtIconButton from '../ft-icon-button/ft-icon-button.vue' import FtIconButton from '../ft-icon-button/ft-icon-button.vue'
import FtButton from '../ft-button/ft-button.vue' import FtButton from '../ft-button/ft-button.vue'
import FtToastEvents from '../ft-toast/ft-toast-events'
export default Vue.extend({ export default Vue.extend({
name: 'FtShareButton', name: 'FtShareButton',
@ -59,6 +60,7 @@ export default Vue.extend({
}, },
copyInvidious() { copyInvidious() {
FtToastEvents.$emit('toast.open', "Invidious URL copied to clipboard")
this.copy(this.invidiousURL) this.copy(this.invidiousURL)
this.$refs.iconButton.toggleDropdown() this.$refs.iconButton.toggleDropdown()
}, },
@ -69,6 +71,7 @@ export default Vue.extend({
}, },
copyYoutube() { copyYoutube() {
FtToastEvents.$emit('toast.open', "YouTube URL copied to clipboard")
this.copy(this.youtubeURL) this.copy(this.youtubeURL)
this.$refs.iconButton.toggleDropdown() this.$refs.iconButton.toggleDropdown()
}, },
@ -79,6 +82,7 @@ export default Vue.extend({
}, },
copyYoutubeEmbed() { copyYoutubeEmbed() {
FtToastEvents.$emit('toast.open', "YouTube Embed URL copied to clipboard")
this.copy(this.youtubeEmbedURL) this.copy(this.youtubeEmbedURL)
this.$refs.iconButton.toggleDropdown() this.$refs.iconButton.toggleDropdown()
}, },
@ -89,6 +93,7 @@ export default Vue.extend({
}, },
copyInvidiousEmbed() { copyInvidiousEmbed() {
FtToastEvents.$emit('toast.open', "Invidious Embed URL copied to clipboard")
this.copy(this.invidiousEmbedURL) this.copy(this.invidiousEmbedURL)
this.$refs.iconButton.toggleDropdown() this.$refs.iconButton.toggleDropdown()
}, },