From 891ffc20af80e81033caf3531012473e307f712c Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Tue, 30 Oct 2018 15:55:10 -0700 Subject: [PATCH] added copied text after copy button click --- app/ui/archiveTile.js | 6 ++++++ app/ui/download.js | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/ui/archiveTile.js b/app/ui/archiveTile.js index 528819ce..394cacaa 100644 --- a/app/ui/archiveTile.js +++ b/app/ui/archiveTile.js @@ -157,6 +157,12 @@ module.exports = function(state, emit, archive) { function copy(event) { event.stopPropagation(); copyToClipboard(archive.url); + const text = event.target.lastChild; + text.textContent = state.translate('copiedUrl'); + setTimeout( + () => (text.textContent = state.translate('copyUrlHover')), + 1000 + ); } function del(event) { diff --git a/app/ui/download.js b/app/ui/download.js index 9168aa21..6a149b7a 100644 --- a/app/ui/download.js +++ b/app/ui/download.js @@ -8,7 +8,7 @@ function password(state, emit) { const invalid = fileInfo.password === null; const div = html` -
+