Browse Source

fix(nc-gui): removed command palette ee counterpart

pull/7490/head
Ramesh Mane 11 months ago
parent
commit
3c62b9fb58
  1. 2
      packages/nc-gui/composables/useCommandPalette/commands.ts
  2. 12
      packages/nc-gui/composables/useCommandPalette/index.ts

2
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)

12
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()

Loading…
Cancel
Save