Merge pull request #2477 from keepassxreboot/feature/hide_icon_on_request

Add support for hiding icons manually
This commit is contained in:
Sami Vänttinen 2025-03-09 13:42:50 +02:00 committed by GitHub
commit 23b3cf586c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 24 additions and 0 deletions

View file

@ -906,6 +906,10 @@
"message": "Adds an icon to input fields that are recognized as OTP/2FA.",
"description": "OTP field icon option help text."
},
"optionsHideIconsAlertText": {
"message": "You can also hide icons manually when needed with shift+click.",
"description": "Hide icons alert text text."
},
"optionsAutoRetrieveCredentialsHelpText": {
"message": "KeePassXC-Browser will immediately retrieve credentials when a tab is activated.",
"description": "Auto-Retrive Credentials option help text."

View file

@ -74,6 +74,11 @@ PasswordIcon.prototype.createIcon = function(field) {
return;
}
if (e.shiftKey) {
icon.style.display = 'none';
return;
}
e.stopPropagation();
kpxcPasswordGenerator.showPasswordGenerator(field);
});

View file

@ -164,6 +164,11 @@ TOTPFieldIcon.prototype.createIcon = function(field, segmented = false) {
return;
}
if (e.shiftKey) {
icon.style.display = 'none';
return;
}
e.stopPropagation();
await kpxc.receiveCredentialsIfNecessary();
kpxcFill.fillFromTOTP(field);

View file

@ -96,6 +96,11 @@ UsernameFieldIcon.prototype.createIcon = function(field) {
return;
}
if (e.shiftKey) {
icon.style.display = 'none';
return;
}
e.stopPropagation();
iconClicked(field, icon);
});

View file

@ -119,6 +119,11 @@
</div>
</div>
<div class="alert alert-secondary mt-3 col-lg-9" role="alert" id="iconAlert">
<i class="fa fa-exclamation-circle" aria-hidden="true"></i>
<span data-i18n="optionsHideIconsAlertText"></span>
</div>
<!-- Show notifications -->
<div class="form-group">
<div class="form-check">