From 3c62b9fb58a91d7fb303452e6e0b734ecdb771ce Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Thu, 25 Jan 2024 12:47:34 +0000 Subject: [PATCH] fix(nc-gui): removed command palette ee counterpart --- .../nc-gui/composables/useCommandPalette/commands.ts | 2 ++ .../nc-gui/composables/useCommandPalette/index.ts | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/packages/nc-gui/composables/useCommandPalette/commands.ts b/packages/nc-gui/composables/useCommandPalette/commands.ts index 79a7a9d557..407a2bf86f 100644 --- a/packages/nc-gui/composables/useCommandPalette/commands.ts +++ b/packages/nc-gui/composables/useCommandPalette/commands.ts @@ -65,7 +65,9 @@ export const homeCommands = [ Commands: * home (Navigate Home) + + workspaces (Workspaces - EE) + bases (Projects) + * workspace (Workspace - EE) + tables (Tables) + views (Views) * account_settings (Account Settings) diff --git a/packages/nc-gui/composables/useCommandPalette/index.ts b/packages/nc-gui/composables/useCommandPalette/index.ts index 7635247a37..5aaf46e144 100644 --- a/packages/nc-gui/composables/useCommandPalette/index.ts +++ b/packages/nc-gui/composables/useCommandPalette/index.ts @@ -147,8 +147,18 @@ export const useCommandPalette = createSharedComposable(() => { if (route.value.params.typeOrId && typeof route.value.params.typeOrId === 'string') { if (route.value.params.typeOrId === 'base') { if (activeScope.value.scope === 'disabled') return + activeScope.value = { scope: 'disabled', data: {} } + loadScope() + } else if (route.value.params.typeOrId.startsWith('w')) { + if (activeScope.value.data?.workspace_id === route.value.params.typeOrId) return + + activeScope.value = { + scope: `ws-${route.value.params.typeOrId}`, + data: { workspace_id: route.value.params.typeOrId }, + } + loadScope() } else if (route.value.params.typeOrId === 'nc') { if (activeScope.value.data.base_id === route.value.params.baseId) return @@ -161,11 +171,13 @@ export const useCommandPalette = createSharedComposable(() => { } else { if (route.value.path.startsWith('/account')) { if (activeScope.value.scope === 'account_settings') return + activeScope.value = { scope: 'account_settings', data: {} } loadScope() } else { if (activeScope.value.scope === 'root') return + activeScope.value = { scope: 'root', data: {} } loadScope()