mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-30 16:21:39 +00:00
fix(connection): hide installed driver hint
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import type { DatabaseType } from "@/types/database";
|
||||
import { supportsDriverManagement } from "./databaseCapabilities";
|
||||
|
||||
export interface AgentDriverInstallState {
|
||||
db_type: string;
|
||||
installed: boolean;
|
||||
}
|
||||
|
||||
export function showAgentDriverInstallHint(
|
||||
dbType: DatabaseType | undefined,
|
||||
drivers: readonly AgentDriverInstallState[],
|
||||
): boolean {
|
||||
if (!supportsDriverManagement(dbType)) return false;
|
||||
return drivers.find((driver) => driver.db_type === dbType)?.installed !== true;
|
||||
}
|
||||
Reference in New Issue
Block a user