From b9099965cfc33ff72c3fd9103ad2b6d3405b467c Mon Sep 17 00:00:00 2001 From: David Torosyan Date: Sat, 26 Aug 2023 22:11:54 -0700 Subject: [PATCH] [desktop] Allow manual sync while locked --- apps/desktop/src/main/menu/menu.file.ts | 2 +- apps/desktop/src/main/menu/menu.first.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/main/menu/menu.file.ts b/apps/desktop/src/main/menu/menu.file.ts index 173b6066ab..4d0db81d18 100644 --- a/apps/desktop/src/main/menu/menu.file.ts +++ b/apps/desktop/src/main/menu/menu.file.ts @@ -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, }; } diff --git a/apps/desktop/src/main/menu/menu.first.ts b/apps/desktop/src/main/menu/menu.first.ts index b164e280d0..2d1d58be78 100644 --- a/apps/desktop/src/main/menu/menu.first.ts +++ b/apps/desktop/src/main/menu/menu.first.ts @@ -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",