diff --git a/apps/desktop/src/App.vue b/apps/desktop/src/App.vue index 4ca0b30e29..2f5ec25017 100644 --- a/apps/desktop/src/App.vue +++ b/apps/desktop/src/App.vue @@ -135,6 +135,7 @@ const settingsInitialSection = ref(undefined); const showQueryEditorDdlDialog = ref(false); const driverStoreTabOpen = ref(false); const driverStoreActive = ref(false); +const driverStoreActiveTab = ref<"agent" | "jdbc" | "storage" | "runtime">("agent"); const settingsReturnSurface = ref<"query" | "driverStore" | "welcome">("welcome"); const showDriverStore = computed(() => driverStoreTabOpen.value && driverStoreActive.value); const showSettingsPage = computed(() => settingsPageTabOpen.value && settingsStore.settingsPageActive); @@ -316,7 +317,8 @@ function closeSettingsPage() { driverStoreActive.value = false; } -function openDriverStorePage() { +function openDriverStorePage(tab?: "agent" | "jdbc" | "storage" | "runtime") { + if (tab) driverStoreActiveTab.value = tab; driverStoreTabOpen.value = true; driverStoreActive.value = true; settingsStore.settingsPageActive = false; @@ -325,6 +327,7 @@ function openDriverStorePage() { function closeDriverStorePage() { driverStoreTabOpen.value = false; driverStoreActive.value = false; + driverStoreActiveTab.value = "agent"; } const toolbarAgentDriverUpdateCount = computed(() => (updateNotificationsEnabled.value ? agentDriverUpdateCount.value : 0)); const toolbarHasUpdateAvailable = computed(() => updateNotificationsEnabled.value && hasUpdateAvailable.value); @@ -1898,7 +1901,7 @@ onUnmounted(() => { @discard-all-tab-close="handleDiscardAllPendingTabClose" @cancel-tab-close="cancelPendingAppClose" /> - + { " @open-driver-store=" setConnectionDialogOpen(false); - openDriverStorePage(); + openDriverStorePage($event); " @open-tunnel-profile-settings=" setConnectionDialogOpen(false); diff --git a/apps/desktop/src/components/config/DriverStoreDialog.vue b/apps/desktop/src/components/config/DriverStoreDialog.vue index 09dfb39b29..546661cf62 100644 --- a/apps/desktop/src/components/config/DriverStoreDialog.vue +++ b/apps/desktop/src/components/config/DriverStoreDialog.vue @@ -28,17 +28,23 @@ const isWeb = !isTauriRuntime(); const props = withDefaults( defineProps<{ updateNotificationsEnabled?: boolean; + activeTab?: "agent" | "jdbc" | "storage" | "runtime"; }>(), { updateNotificationsEnabled: true, + activeTab: "agent", }, ); const emit = defineEmits<{ "update-count-change": [count: number]; + "update:activeTab": [tab: "agent" | "jdbc" | "storage" | "runtime"]; }>(); -const driverStoreTab = ref("agent"); +const driverStoreTab = computed({ + get: () => props.activeTab, + set: (tab: "agent" | "jdbc" | "storage" | "runtime") => emit("update:activeTab", tab), +}); // ──────────── Driver store path ──────────── diff --git a/apps/desktop/src/components/connection/ConnectionDialog.vue b/apps/desktop/src/components/connection/ConnectionDialog.vue index 551fec3224..f4c6cb3027 100644 --- a/apps/desktop/src/components/connection/ConnectionDialog.vue +++ b/apps/desktop/src/components/connection/ConnectionDialog.vue @@ -117,7 +117,7 @@ const emit = defineEmits<{ connectStarted: [name: string]; connectSucceeded: [name: string]; connectFailed: [message: string]; - openDriverStore: []; + openDriverStore: [tab?: "jdbc"]; openTunnelProfileSettings: []; }>(); @@ -1820,7 +1820,6 @@ const dbOptions: DbOption[] = [ { value: "nacos", label: "Nacos" }, { value: "influxdb", label: "InfluxDB" }, { value: "iris", label: "IRIS" }, - { value: "jdbc", label: "JDBC" }, { value: "manticoresearch", label: "Manticore Search" }, { value: "custom_mysql", label: "Custom (MySQL)" }, { value: "custom_postgres", label: "Custom (PostgreSQL)" }, @@ -3833,7 +3832,7 @@ function openExternalUrl(url: string) {