added password setting error UI
This commit is contained in:
parent
c18f488be7
commit
14b40d820b
9 changed files with 63 additions and 48 deletions
|
@ -9,7 +9,7 @@ module.exports = function(state, emit) {
|
|||
<div class="checkbox">
|
||||
<input
|
||||
${file.hasPassword ? 'disabled' : ''}
|
||||
${file.hasPassword ? 'checked' : ''}
|
||||
${file.hasPassword || state.passwordSetError ? 'checked' : ''}
|
||||
class="checkbox__input"
|
||||
id="add-password"
|
||||
type="checkbox"
|
||||
|
@ -26,7 +26,7 @@ module.exports = function(state, emit) {
|
|||
const unlockInput = document.getElementById('password-input');
|
||||
const boxChecked = e.target.checked;
|
||||
document
|
||||
.querySelector('form.passwordInput')
|
||||
.querySelector('.passwordInput')
|
||||
.classList.toggle('passwordInput--hidden', !boxChecked);
|
||||
if (boxChecked) {
|
||||
unlockInput.focus();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue