Add support for hiding icons manually

This commit is contained in:
varjolintu 2025-03-09 11:14:41 +02:00
parent 8d0d098b45
commit 138de053ce
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">