mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Add support for fixed entropy display
This commit is contained in:
parent
26b4ee56df
commit
5cc9dff137
2 changed files with 6 additions and 1 deletions
|
|
@ -336,7 +336,11 @@ kpxcPassword.callbackGeneratedPassword = function(entries) {
|
|||
kpxcPassword.whiteButton('#kpxc-pwgen-btn-fill');
|
||||
kpxcPassword.whiteButton('#kpxc-pwgen-btn-copy');
|
||||
$('.kpxc-pwgen-input').value = entries[0].password;
|
||||
$('.kpxc-pwgen-bits').textContent = tr('passwordGeneratorBits', (isNaN(entries[0].login) ? '???' : entries[0].login));
|
||||
if (entries[0].entropy) {
|
||||
$('.kpxc-pwgen-bits').textContent = tr('passwordGeneratorBits', (Number.isNaN(entries[0].entropy) ? '???' : String(entries[0].entropy.toFixed(2))));
|
||||
} else {
|
||||
$('.kpxc-pwgen-bits').textContent = tr('passwordGeneratorBits', (isNaN(entries[0].login) ? '???' : entries[0].login));
|
||||
}
|
||||
} else {
|
||||
if (document.querySelectorAll('div#kpxc-pwgen-error').length === 0) {
|
||||
$('.kpxc-pwgen-checkbox').parentElement.style.display = 'none';
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@
|
|||
border: 1px solid #ccc;
|
||||
padding: .4em;
|
||||
border-radius: 4px;
|
||||
width: 30%;
|
||||
min-width: 60px;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue