Merge pull request #1928 from keepassxreboot/fix/add_domain_to_notification

Add a notification with domain URL when logins are not found for a site
This commit is contained in:
Sami Vänttinen 2023-06-25 09:35:12 +03:00 committed by GitHub
commit c41cea4e0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,7 +25,8 @@ kpxcFill.fillAttributeToActiveElementWith = async function(attr) {
kpxcFill.fillInFromActiveElement = async function(passOnly = false) {
await kpxc.receiveCredentialsIfNecessary();
if (kpxc.credentials.length === 0) {
logDebug('Error: Credential list is empty.');
logDebug(`Error: Credential list is empty for: ${document.location.origin}`);
kpxcUI.createNotification('error', `${tr('credentialsNoLoginsFound')} ${document.location.origin}`);
return;
}
@ -192,7 +193,8 @@ kpxcFill.fillSegmentedTotp = function(elem, val, totpInputs) {
kpxcFill.fillFromUsernameIcon = async function(combination) {
await kpxc.receiveCredentialsIfNecessary();
if (kpxc.credentials.length === 0) {
logDebug('Error: Credential list is empty.');
logDebug(`Error: Credential list is empty for: ${document.location.origin}`);
kpxcUI.createNotification('error', `${tr('credentialsNoLoginsFound')} ${document.location.origin}`);
return;
} else if (kpxc.credentials.length > 1 && kpxc.settings.autoCompleteUsernames) {
kpxcUserAutocomplete.showList(combination.username || combination.password);