Merge pull request #54 from keepassxreboot/login_notification

Add a new option showLoginNotifications
This commit is contained in:
Janek Bevendorff 2018-03-10 12:48:53 +01:00 committed by GitHub
commit 9508ce7bc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 3 deletions

View file

@ -239,7 +239,7 @@ browserAction.setRememberPopup = function(tabId, username, password, url, userna
browserAction.show(null, {'id': id});
if (page.settings.showNotifications) {
if (page.settings.showLoginNotifications) {
showNotification('Create or modify the credentials by clicking on the extension icon.');
}
});

View file

@ -5,7 +5,8 @@ const defaultSettings = {
usePasswordGenerator: true,
autoFillSingleEntry: false,
autoRetrieveCredentials: true,
showNotifications: true
showNotifications: true,
showLoginNotifications: true
};
var page = {};
@ -38,6 +39,9 @@ page.initSettings = function() {
if (!('showNotifications' in page.settings)) {
page.settings.showNotifications = defaultSettings.showNotifications;
}
if (!('showLoginNotifications' in page.settings)) {
page.settings.showLoginNotifications = defaultSettings.showLoginNotifications;
}
browser.storage.local.set({'settings': page.settings});
resolve(page.settings);
});

View file

@ -130,7 +130,12 @@
<label class="checkbox">
<input type="checkbox" name="showNotifications" value="true" /> Show notifications.
</label>
<span class="help-block">Allow KeePassXC-Browser to show notifications when user interaction is needed from the extension icon.</span>
<span class="help-block">Show notifications for errors and when user interaction is required.</span>
</div>
<div class="checkbox">
<label class="checkbox">
<input type="checkbox" name="showLoginNotifications" value="true" /> Show a notification when new credentials can be saved to the database.
</label>
</div>
</p>
<hr />