disable copying link when password not completed

This commit is contained in:
Erica Wright 2017-10-23 09:51:33 -04:00
parent 9410defab6
commit 046f227003
No known key found for this signature in database
GPG key ID: D9F2AF9D67D0AAB7
3 changed files with 19 additions and 3 deletions

View file

@ -57,6 +57,7 @@ module.exports = function(state, emit) {
input.disabled = true;
const copyBtn = document.getElementById('copy-btn');
copyBtn.disabled = true;
copyBtn.classList.add('success');
copyBtn.replaceChild(
html`<img src="${assets.get('check-16.svg')}" class="icon-check">`,
copyBtn.firstChild
@ -64,6 +65,7 @@ module.exports = function(state, emit) {
await delay(2000);
input.disabled = false;
copyBtn.disabled = false;
copyBtn.classList.remove('success');
copyBtn.textContent = state.translate('copyUrlFormButton');
}
}