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>'
|
||||
})}</div>`
|
||||
]);
|
||||
const displayPassword = [];
|
||||
for (let i = 0; i < password.length; i++) {
|
||||
displayPassword[i] = '●';
|
||||
}
|
||||
|
||||
const passwordOriginal = document.createElement('div');
|
||||
passwordOriginal.className = 'passwordOriginal';
|
||||
passwordOriginal.innerText = password;
|
||||
|
||||
const passwordStar = document.createElement('div');
|
||||
passwordStar.className = 'passwordStar';
|
||||
passwordStar.innerText = displayPassword
|
||||
.toString()
|
||||
.split(',')
|
||||
.join('');
|
||||
passwordStar.innerText = password.replace(/./g, '●');
|
||||
el.lastElementChild.appendChild(passwordOriginal);
|
||||
el.lastElementChild.appendChild(passwordStar);
|
||||
return el;
|
||||
|
|
|
@ -146,6 +146,7 @@ button {
|
|||
}
|
||||
|
||||
pre {
|
||||
font-family: monospace;
|
||||
font-weight: 600;
|
||||
display: inline-block;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue