fixes #545 copy effect
This commit is contained in:
parent
4b39d61ff4
commit
15244e1a64
|
@ -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');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue