use monospace font for password display
This commit is contained in:
parent
99097baf9d
commit
1741b1c686
|
@ -12,21 +12,13 @@ function passwordComplete(state, password) {
|
||||||
password: '<pre></pre>'
|
password: '<pre></pre>'
|
||||||
})}</div>`
|
})}</div>`
|
||||||
]);
|
]);
|
||||||
const displayPassword = [];
|
|
||||||
for (let i = 0; i < password.length; i++) {
|
|
||||||
displayPassword[i] = '●';
|
|
||||||
}
|
|
||||||
|
|
||||||
const passwordOriginal = document.createElement('div');
|
const passwordOriginal = document.createElement('div');
|
||||||
passwordOriginal.className = 'passwordOriginal';
|
passwordOriginal.className = 'passwordOriginal';
|
||||||
passwordOriginal.innerText = password;
|
passwordOriginal.innerText = password;
|
||||||
|
|
||||||
const passwordStar = document.createElement('div');
|
const passwordStar = document.createElement('div');
|
||||||
passwordStar.className = 'passwordStar';
|
passwordStar.className = 'passwordStar';
|
||||||
passwordStar.innerText = displayPassword
|
passwordStar.innerText = password.replace(/./g, '●');
|
||||||
.toString()
|
|
||||||
.split(',')
|
|
||||||
.join('');
|
|
||||||
el.lastElementChild.appendChild(passwordOriginal);
|
el.lastElementChild.appendChild(passwordOriginal);
|
||||||
el.lastElementChild.appendChild(passwordStar);
|
el.lastElementChild.appendChild(passwordStar);
|
||||||
return el;
|
return el;
|
||||||
|
|
|
@ -146,6 +146,7 @@ button {
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
|
font-family: monospace;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue