1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-30 13:03:53 +01:00

Add 'lock_vault' command (#1450)

* Update manifest.json

Add additional command to lock the vault

* Update shortcuts.ts

add mousetrap binding for lock_vault command

* Update commands.background.ts

add option to lock vault with shortcut

* Update messages.json

add german key for lock_vault

* Update messages.json

add english key for 'lock_vault' command

* remove commandLockVaultDesc from de message pack

* Update messages.json

* Update shortcuts.ts

update comment for safari keybinding

* Update shortcuts.ts

remove confusing comment

Co-authored-by: ljakobitz@dev5310.com <ljakobitz@dev5310.com>
Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
This commit is contained in:
comparesheriff 2020-11-06 16:43:06 +01:00 committed by GitHub
parent 62edd889f7
commit 6b6fc33b6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 0 deletions

View File

@ -894,6 +894,9 @@
"commandGeneratePasswordDesc": {
"message": "Generate and copy a new random password to the clipboard"
},
"commandLockVaultDesc": {
"message": "Lock the vault"
},
"privateModeMessage": {
"message": "Unfortunately this window is not available in private mode for this browser."
},

View File

@ -44,6 +44,9 @@ export default class CommandsBackground {
case 'open_popup':
await this.openPopup();
break;
case 'lock_vault':
await this.vaultTimeoutService.lock(true);
break;
default:
break;
}

View File

@ -35,6 +35,10 @@ document.addEventListener('DOMContentLoaded', (event) => {
});
}
Mousetrap.bind('mod+shift+s', () => {
sendMessage('lock_vault');
});
function sendMessage(shortcut: string) {
const msg: any = {
command: 'keyboardShortcutTriggered',

View File

@ -118,6 +118,9 @@
"default": "Ctrl+Shift+9"
},
"description": "__MSG_commandGeneratePasswordDesc__"
},
"lock_vault": {
"description": "__MSG_commandLockVaultDesc__"
}
},
"web_accessible_resources": [