From 4a549e6353abd382456903a6a396a7a655c34ada Mon Sep 17 00:00:00 2001 From: Jo Vuit Date: Wed, 13 Feb 2019 19:33:43 +0100 Subject: [PATCH] Added a message to be displayed for 5 seconds after the copied button has been clicked. The copy() function has been modified according to components/common/CopyInput.vue --- front/src/components/audio/EmbedWizard.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/front/src/components/audio/EmbedWizard.vue b/front/src/components/audio/EmbedWizard.vue index 73569e64f..a5311d106 100644 --- a/front/src/components/audio/EmbedWizard.vue +++ b/front/src/components/audio/EmbedWizard.vue @@ -22,6 +22,9 @@

Copy/paste this code in your website HTML

+
+

Text copied to clipboard!

+
@@ -40,7 +43,8 @@ export default { let d = { width: null, height: 150, - minHeight: 100 + minHeight: 100, + copied: false } if (this.type === 'album') { d.height = 330 @@ -69,6 +73,11 @@ export default { copy () { this.$refs.textarea.select() document.execCommand("Copy") + let self = this + self.copied = true + this.timeout = setTimeout(() => { + self.copied = false + }, 5000) } } } @@ -76,4 +85,9 @@ export default {