[desktop] Allow manual sync while locked

This commit is contained in:
David Torosyan 2023-08-26 22:11:54 -07:00
parent 834531bd98
commit b9099965cf
2 changed files with 5 additions and 1 deletions

View File

@ -119,7 +119,7 @@ export class FileMenu extends FirstMenu implements IMenubarMenu {
id: "syncVault",
label: this.localize("syncVault"),
click: () => this.sendMessage("syncVault"),
enabled: !this._isLocked,
enabled: this.hasAuthenticatedAccounts,
};
}

View File

@ -27,6 +27,10 @@ export class FirstMenu {
return this._accounts != null && Object.values(this._accounts).some((a) => a.isLockable);
}
protected get hasAuthenticatedAccounts(): boolean {
return this._accounts != null && Object.values(this._accounts).some((a) => a.isAuthenticated);
}
protected get checkForUpdates(): MenuItemConstructorOptions {
return {
id: "checkForUpdates",