diff --git a/apps/desktop/src/App.vue b/apps/desktop/src/App.vue index fc7f076c5b..179b6a2dea 100644 --- a/apps/desktop/src/App.vue +++ b/apps/desktop/src/App.vue @@ -4521,6 +4521,7 @@ onUnmounted(() => { }); } " + @open-database-search-target="(_tabId: string, target: any) => openDatabaseSearchTarget(target)" @object-schema-change="(tabId: string, schema: string | undefined) => queryStore.updateSchema(tabId, schema)" @object-browser-viewport-change="(tabId: string, viewport: any) => queryStore.updateObjectBrowserViewport(tabId, viewport)" @object-browser-search-change="(tabId: string, query: string) => queryStore.updateObjectBrowserSearch(tabId, query)" diff --git a/apps/desktop/src/components/layout/ContentArea.vue b/apps/desktop/src/components/layout/ContentArea.vue index 29bddbbb0a..2d95d886ca 100644 --- a/apps/desktop/src/components/layout/ContentArea.vue +++ b/apps/desktop/src/components/layout/ContentArea.vue @@ -123,6 +123,7 @@ const NacosAdminConsole = defineAsyncComponent(() => import("@/components/nacos/ const NacosAccessControlConsole = defineAsyncComponent(() => import("@/components/nacos/NacosAccessControlConsole.vue")); const NacosDashboard = defineAsyncComponent(() => import("@/components/nacos/NacosDashboard.vue")); const DoltVersionControl = defineAsyncComponent(() => import("@/components/dolt/DoltVersionControl.vue")); +const DatabaseSearchPanel = defineAsyncComponent(() => import("@/components/search/DatabaseSearchPanel.vue")); const DatabaseBrowser = defineAsyncComponent(() => import("@/components/objects/DatabaseBrowser.vue")); const ObjectBrowser = defineAsyncComponent(() => import("@/components/objects/ObjectBrowser.vue")); const TableStructureEditor = defineAsyncComponent(() => import("@/components/structure/TableStructureEditor.vue")); @@ -361,6 +362,7 @@ const etcdDashboardRef = ref<{ refresh?: () => boolean }>(); const zookeeperKeyBrowserRef = ref(); const consulOverviewRef = ref<{ refresh?: () => boolean }>(); const consulWorkspaceRef = ref(); +const databaseSearchPanelRef = ref<{ focusSearch: () => boolean }>(); const databaseBrowserRef = ref(); const objectBrowserRef = ref(); const pluginFilesystemTabRef = ref<{ refresh: () => Promise }>(); @@ -1258,6 +1260,7 @@ function focusSearch(target: Element | null = null): boolean { if (props.activeTab.mode === "zookeeper") return zookeeperKeyBrowserRef.value?.focusSearch() ?? false; if (props.activeTab.mode === "consul") return consulWorkspaceRef.value?.focusSearch() ?? false; if (props.activeTab.mode === "databases") return databaseBrowserRef.value?.focusSearch() ?? false; + if (props.activeTab.mode === "database-search") return databaseSearchPanelRef.value?.focusSearch() ?? false; if (props.activeTab.mode === "objects") return objectBrowserRef.value?.focusSearch(target) ?? false; if (props.activeTab.mode === "structure") return tableStructureEditorRef.value?.focusSearch() ?? false; if (props.activeTab.mode === "query") { @@ -3171,6 +3174,26 @@ defineExpose({ /> + +