1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-11-27 12:26:38 +01:00

Update i18n string and id for tray menu Lock item (#1334)

This commit is contained in:
Thomas Rittson 2022-02-14 23:40:06 +10:00 committed by GitHub
parent 884615c23a
commit 659c9ea78d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -153,9 +153,9 @@ export class Main {
this.menuMain.init();
await this.trayMain.init("Bitwarden", [
{
label: this.i18nService.t("lockNow"),
label: this.i18nService.t("lockVault"),
enabled: false,
id: "lockNow",
id: "lockVault",
click: () => this.messagingService.send("lockVault"),
},
]);

View File

@ -99,10 +99,10 @@ export class MessagingMain {
) {
return;
}
const lockNowTrayMenuItem = this.main.trayMain.contextMenu.getMenuItemById("lockNow");
const lockVaultTrayMenuItem = this.main.trayMain.contextMenu.getMenuItemById("lockVault");
const activeAccount = updateRequest.accounts[updateRequest.activeUserId];
if (lockNowTrayMenuItem != null && activeAccount != null) {
lockNowTrayMenuItem.enabled = activeAccount.isAuthenticated && !activeAccount.isLocked;
if (lockVaultTrayMenuItem != null && activeAccount != null) {
lockVaultTrayMenuItem.enabled = activeAccount.isAuthenticated && !activeAccount.isLocked;
}
this.main.trayMain.updateContextMenu();
}