mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
more tray icon options
This commit is contained in:
@@ -21,6 +21,16 @@ export class MessagingMain {
|
||||
break;
|
||||
case 'updateAppMenu':
|
||||
this.main.menuMain.updateApplicationMenuState(message.isAuthenticated, message.isLocked);
|
||||
this.updateTrayMenu(message.isAuthenticated, message.isLocked);
|
||||
break;
|
||||
case 'showTray':
|
||||
this.main.trayMain.showTray();
|
||||
break;
|
||||
case 'removeTray':
|
||||
this.main.trayMain.removeTray();
|
||||
break;
|
||||
case 'hideToTray':
|
||||
this.main.trayMain.hideToTray();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -42,4 +52,11 @@ export class MessagingMain {
|
||||
});
|
||||
}, SyncInterval);
|
||||
}
|
||||
|
||||
private updateTrayMenu(isAuthenticated: boolean, isLocked: boolean) {
|
||||
const lockNowTrayMenuItem = this.main.trayMain.contextMenu.getMenuItemById('lockNow');
|
||||
if (lockNowTrayMenuItem != null) {
|
||||
lockNowTrayMenuItem.enabled = isAuthenticated && !isLocked;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user