fixes #545 copy effect

This commit is contained in:
Danny Coates 2017-08-29 11:25:41 -07:00
parent 4b39d61ff4
commit 15244e1a64
No known key found for this signature in database
GPG Key ID: 4C442633C62E00CB
1 changed files with 3 additions and 0 deletions

View File

@ -40,6 +40,8 @@ module.exports = function(state, emit) {
async function copyLink() {
if (allowedCopy()) {
emit('copy', { url: file.url, location: 'success-screen' });
const input = document.getElementById('link');
input.disabled = true;
const copyBtn = document.getElementById('copy-btn');
copyBtn.disabled = true;
copyBtn.replaceChild(
@ -47,6 +49,7 @@ module.exports = function(state, emit) {
copyBtn.firstChild
);
await delay(2000);
input.disabled = false;
copyBtn.disabled = false;
copyBtn.textContent = state.translate('copyUrlFormButton');
}