added an option to focus KeeWeb when the file is locked

This commit is contained in:
antelle 2021-04-18 21:02:43 +02:00
parent 3fd799ee74
commit ed56f0733e
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
4 changed files with 18 additions and 2 deletions

View File

@ -47,6 +47,7 @@ const DefaultAppSettings = {
deviceOwnerAuthTimeoutMinutes: 0, // how often master password is required with Touch ID
disableOfflineStorage: false, // don't cache loaded files in offline storage
shortLivedStorageToken: false, // short-lived sessions in cloud storage providers
extensionFocusIfLocked: true, // focus KeeWeb if a browser extension tries to connect while KeeWeb is locked
yubiKeyShowIcon: true, // show an icon to open OTP codes from YubiKey
yubiKeyAutoOpen: false, // auto-load one-time codes when there are open files

View File

@ -647,6 +647,7 @@
"setBrowserIntroWeb": "Install our browser extension to auto-fill passwords from KeeWeb on different pages. The browser extension will connect to a KeeWeb tab in your browser to fetch passwords. Click here to download the extension:",
"setBrowserNotEnabled": "Browser integration is not enabled, extensions won't be able to connect to KeeWeb. Use the checkboxes below to enable it:",
"setBrowserEnablePerBrowser": "Enable browser integration using the checkboxes below:",
"setBrowserFocusIfLocked": "Open KeeWeb is a browser extension tries to connect while the file is locked",
"setDevicesTitle": "Devices",
"setDevicesEnableUsb": "Enable interaction with USB devices",

View File

@ -8,13 +8,15 @@ class SettingsBrowserView extends View {
template = template;
events = {
'change .check-enable-for-browser': 'changeEnableForBrowser'
'change .check-enable-for-browser': 'changeEnableForBrowser',
'change .settings__browser-focus-if-locked': 'changeFocusIfLocked'
};
render() {
const data = {
desktop: Features.isDesktop,
icon: Features.browserIcon
icon: Features.browserIcon,
focusIfLocked: AppSettingsModel.extensionFocusIfLocked
};
if (Features.isDesktop) {
data.settingsPerBrowser = this.getSettingsPerBrowser();
@ -55,6 +57,11 @@ class SettingsBrowserView extends View {
this.render();
}
changeFocusIfLocked(e) {
AppSettingsModel.extensionFocusIfLocked = e.target.checked;
this.render();
}
}
export { SettingsBrowserView };

View File

@ -61,4 +61,11 @@
KeeWeb Connect {{res 'for'}} {{extensionBrowserFamily}}
</a>
{{/if}}
<div>
<input type="checkbox" class="settings__input input-base settings__browser-focus-if-locked"
id="settings__browser-focus-if-locked"
{{#if focusIfLocked}}checked{{/if}} />
<label for="settings__browser-focus-if-locked">{{res 'setBrowserFocusIfLocked'}}</label>
</div>
</div>