mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Modify checkbox option for auto-filling relevant credential entries in options
This commit is contained in:
parent
1b9e2b08b9
commit
ae03c0aec6
3 changed files with 22 additions and 15 deletions
|
|
@ -766,6 +766,10 @@
|
|||
"message": "Automatically fill in single-credential entries",
|
||||
"description": "Automatically fill-in single credential entry checkbox text."
|
||||
},
|
||||
"optionsCheckboxAutoFillRelevantCredential": {
|
||||
"message": "Automatically fill in relevant credential entries",
|
||||
"description": "Automatically fill-in relevant credential entry checkbox text."
|
||||
},
|
||||
"optionsCheckboxAutoFillSingleTotp": {
|
||||
"message": "Automatically fill in single TOTP entries",
|
||||
"description": "Automatically fill-in single TOTP entries checkbox text."
|
||||
|
|
@ -914,6 +918,10 @@
|
|||
"message": "Let KeePassXC-Browser automatically fill in credentials if it receives only a single entry.",
|
||||
"description": "Auto-Fill Single Entry option help text."
|
||||
},
|
||||
"optionsAutoFillRelevantCredentialHelpText": {
|
||||
"message": "Let KeePassXC-Browser automatically fill in credentials if it receives relevant credential.",
|
||||
"description": "Auto-Fill Relevant Credential option help text."
|
||||
},
|
||||
"optionsAutoFillSingleEntryWarning": {
|
||||
"message": "Warning! Using auto-fill is not safe. Use at your own risk. KeePassXC-Browser automatically tries to detect login fields. However, they may be detected incorrectly, possibly filling sensitive data to unsafe input fields.",
|
||||
"description": "Auto-Fill Single Entry warning text."
|
||||
|
|
@ -939,8 +947,8 @@
|
|||
"description": "Use monochrome toolbar icon option help text."
|
||||
},
|
||||
"optionsUseCompactModeHelpText": {
|
||||
"message": "Use a compact version of the dropdown list to select credentials.",
|
||||
"description": "Use compact (legacy) mode help text."
|
||||
"message": "Use a compact version of the dropdown list to select credentials.",
|
||||
"description": "Use compact (legacy) mode help text."
|
||||
},
|
||||
"optionsSaveDomainOnlyHelpText": {
|
||||
"message": "When saving new credentials, save only the domain instead of full URL.",
|
||||
|
|
@ -1089,7 +1097,7 @@
|
|||
"optionsColumnAllowIframes": {
|
||||
"message": "Allow Cross-Origin iframes",
|
||||
"description": "Allow iframes column text."
|
||||
},
|
||||
},
|
||||
"optionsColumnDelete": {
|
||||
"message": "Delete",
|
||||
"description": "Site Preferences list column title."
|
||||
|
|
|
|||
|
|
@ -517,13 +517,11 @@ kpxc.prepareCredentials = async function() {
|
|||
if (kpxc.settings.autoFillRelevantCredential) {
|
||||
const pageUuid = await sendMessage('page_get_login_id');
|
||||
if (pageUuid) {
|
||||
kpxc.credentials.some(c => {
|
||||
if (c.uuid === pageUuid) {
|
||||
const index = kpxc.combinations.length - 1;
|
||||
kpxcFill.fillInCredentials(kpxc.combinations[index], c.login, c.uuid);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
const relevantCredential = kpxc.credentials.find(c => c.uuid === pageUuid);
|
||||
if (relevantCredential) {
|
||||
const index = kpxc.combinations.length - 1;
|
||||
kpxcFill.fillInCredentials(kpxc.combinations[index], relevantCredential.login, relevantCredential.uuid);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -217,6 +217,11 @@
|
|||
</div>
|
||||
<div>
|
||||
<span class="form-text text-muted" data-i18n="optionsFillSortPriorityHelpText"></span>
|
||||
<div class="form-check mt-2">
|
||||
<input class="form-check-input" type="checkbox" name="autoFillRelevantCredential" id="autoFillRelevantCredential" value="true">
|
||||
<label class="form-check-label" for="autoFillRelevantCredential" data-i18n="optionsCheckboxAutoFillRelevantCredential"></label>
|
||||
<div class="form-text" data-i18n="optionsAutoFillRelevantCredentialHelpText"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Credential sorting after fill for TOTP -->
|
||||
|
|
@ -246,11 +251,7 @@
|
|||
<input class="form-check-input" type="checkbox" name="autoFillSingleEntry" id="autoFillSingleEntry" value="true">
|
||||
<label class="form-check-label" for="autoFillSingleEntry" data-i18n="optionsCheckboxAutoFillSingleEntry"></label>
|
||||
<div class="form-text" data-i18n="optionsAutoFillSingleEntryHelpText"></div>
|
||||
<div class="form-check mt-2">
|
||||
<input class="form-check-input" type="checkbox" name="autoFillRelevantCredential" id="autoFillRelevantCredential" value="true">
|
||||
<label class="form-check-label" for="autoFillRelevantCredential" data-i18n="optionsCheckboxAutoFillRelevantCredential"></label>
|
||||
<div class="form-text" data-i18n="optionsAutoFillRelevantCredentialHelpText"></div>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-warning mt-3 col-lg-9" role="alert">
|
||||
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
|
||||
<span data-i18n="optionsAutoFillSingleEntryWarning"></span>
|
||||
|
|
|
|||
Loading…
Reference in a new issue