use monospace font for password display

This commit is contained in:
Danny Coates 2018-01-10 10:02:14 -08:00
parent 99097baf9d
commit 1741b1c686
No known key found for this signature in database
GPG Key ID: 4C442633C62E00CB
2 changed files with 2 additions and 9 deletions

View File

@ -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;

View File

@ -146,6 +146,7 @@ button {
} }
pre { pre {
font-family: monospace;
font-weight: 600; font-weight: 600;
display: inline-block; display: inline-block;
} }