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

View File

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