Hide change password when using key connector (#1153)
This commit is contained in:
parent
9124314ef9
commit
fa98ef37ec
|
@ -338,7 +338,7 @@ export class AppComponent implements OnInit {
|
||||||
let data: any;
|
let data: any;
|
||||||
if (type === 'sync') {
|
if (type === 'sync') {
|
||||||
data = {
|
data = {
|
||||||
enableChangeMasterPass: !await this.keyConnectorService.getUsesKeyConnector(),
|
hideChangeMasterPass: await this.keyConnectorService.getUsesKeyConnector(),
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
data = {
|
data = {
|
||||||
|
|
|
@ -75,10 +75,10 @@ export class MenuMain extends BaseMenu {
|
||||||
this.syncVault, this.exportVault, this.settings, this.lockNow, this.twoStepLogin, this.fingerprintPhrase,
|
this.syncVault, this.exportVault, this.settings, this.lockNow, this.twoStepLogin, this.fingerprintPhrase,
|
||||||
this.changeMasterPass, this.premiumMembership, this.passwordGenerator, this.passwordHistory,
|
this.changeMasterPass, this.premiumMembership, this.passwordGenerator, this.passwordHistory,
|
||||||
this.searchVault, this.copyUsername, this.copyPassword];
|
this.searchVault, this.copyUsername, this.copyPassword];
|
||||||
this.updateApplicationMenuState(false, true, true);
|
this.updateApplicationMenuState(false, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateApplicationMenuState(isAuthenticated: boolean, isLocked: boolean, enableChangeMasterPass: boolean) {
|
updateApplicationMenuState(isAuthenticated: boolean, isLocked: boolean, hideChangeMasterPass: boolean) {
|
||||||
if (isAuthenticated != null && isLocked != null) {
|
if (isAuthenticated != null && isLocked != null) {
|
||||||
this.unlockedRequiredMenuItems.forEach((mi: MenuItem) => {
|
this.unlockedRequiredMenuItems.forEach((mi: MenuItem) => {
|
||||||
if (mi != null) {
|
if (mi != null) {
|
||||||
|
@ -91,8 +91,8 @@ export class MenuMain extends BaseMenu {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enableChangeMasterPass != null && this.changeMasterPass != null) {
|
if (this.changeMasterPass != null) {
|
||||||
this.changeMasterPass.enabled = enableChangeMasterPass;
|
this.changeMasterPass.visible = !(hideChangeMasterPass ?? false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.menu != null) {
|
if (this.menu != null) {
|
||||||
|
|
|
@ -33,7 +33,7 @@ export class MessagingMain {
|
||||||
break;
|
break;
|
||||||
case 'updateAppMenu':
|
case 'updateAppMenu':
|
||||||
this.main.menuMain.updateApplicationMenuState(message.isAuthenticated, message.isLocked,
|
this.main.menuMain.updateApplicationMenuState(message.isAuthenticated, message.isLocked,
|
||||||
message.enableChangeMasterPass);
|
message.hideChangeMasterPass);
|
||||||
this.updateTrayMenu(message.isAuthenticated, message.isLocked);
|
this.updateTrayMenu(message.isAuthenticated, message.isLocked);
|
||||||
break;
|
break;
|
||||||
case 'minimizeOnCopy':
|
case 'minimizeOnCopy':
|
||||||
|
|
Loading…
Reference in New Issue