diff --git a/src/components/layout/EditorToolbar.vue b/src/components/layout/EditorToolbar.vue index 8dc51b4d61..30d11d7435 100644 --- a/src/components/layout/EditorToolbar.vue +++ b/src/components/layout/EditorToolbar.vue @@ -16,6 +16,7 @@ import { } from "lucide-vue-next"; import { Button } from "@/components/ui/button"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; +import { SearchableSelect } from "@/components/ui/searchable-select"; import { Tooltip, TooltipTrigger, TooltipContent } from "@/components/ui/tooltip"; import DatabaseIcon from "@/components/icons/DatabaseIcon.vue"; import { useConnectionStore } from "@/stores/connectionStore"; @@ -58,6 +59,7 @@ const activeDatabaseOptions = computed(() => { return connection ? (databaseOptions.value[connection.id] ?? []) : []; }); +const connectionOptionIds = computed(() => connectionStore.connections.map((connection) => connection.id)); const activeDatabaseValue = computed(() => props.activeTab.database || ""); const activeConnectionValue = computed(() => props.activeConnection?.id || ""); const activeSchemaValue = computed(() => props.activeTab.schema || ""); @@ -98,6 +100,10 @@ function databaseDisplayName(database: string): string { if (connection?.db_type === "redis" && database !== "") return `db${database}`; return database || t("editor.noDatabase"); } + +function connectionById(connectionId: string): ConnectionConfig | undefined { + return connectionStore.getConfig(connectionId); +}