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:
parent
884615c23a
commit
659c9ea78d
@ -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"),
|
||||
},
|
||||
]);
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user