mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
[Key Connector] Add support for key connector and OTP (#1135)
Co-authored-by: Hinton <oscar@oscarhinton.com>
This commit is contained in:
@@ -75,23 +75,29 @@ export class MenuMain extends BaseMenu {
|
||||
this.syncVault, this.exportVault, this.settings, this.lockNow, this.twoStepLogin, this.fingerprintPhrase,
|
||||
this.changeMasterPass, this.premiumMembership, this.passwordGenerator, this.passwordHistory,
|
||||
this.searchVault, this.copyUsername, this.copyPassword];
|
||||
this.updateApplicationMenuState(false, true);
|
||||
this.updateApplicationMenuState(false, true, true);
|
||||
}
|
||||
|
||||
updateApplicationMenuState(isAuthenticated: boolean, isLocked: boolean) {
|
||||
this.unlockedRequiredMenuItems.forEach((mi: MenuItem) => {
|
||||
if (mi != null) {
|
||||
mi.enabled = isAuthenticated && !isLocked;
|
||||
updateApplicationMenuState(isAuthenticated: boolean, isLocked: boolean, enableChangeMasterPass: boolean) {
|
||||
if (isAuthenticated != null && isLocked != null) {
|
||||
this.unlockedRequiredMenuItems.forEach((mi: MenuItem) => {
|
||||
if (mi != null) {
|
||||
mi.enabled = isAuthenticated && !isLocked;
|
||||
}
|
||||
});
|
||||
|
||||
if (this.logOut != null) {
|
||||
this.logOut.enabled = isAuthenticated;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (enableChangeMasterPass != null && this.changeMasterPass != null) {
|
||||
this.changeMasterPass.enabled = enableChangeMasterPass;
|
||||
}
|
||||
|
||||
if (this.menu != null) {
|
||||
Menu.setApplicationMenu(this.menu);
|
||||
}
|
||||
|
||||
if (this.logOut != null) {
|
||||
this.logOut.enabled = isAuthenticated;
|
||||
}
|
||||
}
|
||||
|
||||
private initApplicationMenu() {
|
||||
|
||||
Reference in New Issue
Block a user