Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

fix: resolve frontend CI type checks

t8y2e43f03dbdef7
diff --git a/apps/desktop/src/composables/useWindowControls.ts b/apps/desktop/src/composables/useWindowControls.ts
index aa1d6cd05b..94e311151e 100644
--- a/apps/desktop/src/composables/useWindowControls.ts
+++ b/apps/desktop/src/composables/useWindowControls.ts
@@ -2,7 +2,7 @@ import { ref, onMounted, onUnmounted } from "vue";
import { isTauriRuntime } from "@/lib/tauriRuntime";
import { isMacOS } from "@/lib/platform";
-export function shouldReserveMacTrafficLightInset(isMac: boolean, isFullscreen: boolean, isDesktop: boolean): boolean {
+export function shouldReserveMacTrafficLightInset(isMac: boolean, isFullscreen: boolean, isDesktop = true): boolean {
return isDesktop && isMac && !isFullscreen;
}
diff --git a/apps/desktop/src/lib/tauri.ts b/apps/desktop/src/lib/tauri.ts
index 457efaa10c..1c5bffd347 100644
--- a/apps/desktop/src/lib/tauri.ts
+++ b/apps/desktop/src/lib/tauri.ts
@@ -694,7 +694,10 @@ export async function listJdbcDrivers(): Promise<JdbcDriverInfo[]> {
return invoke("list_jdbc_drivers");
}
-export async function importJdbcDrivers(paths: string[]): Promise<JdbcDriverInfo[]> {
+export async function importJdbcDrivers(paths: (string | File)[]): Promise<JdbcDriverInfo[]> {
+ if (paths.some((path) => typeof path !== "string")) {
+ throw new Error("Desktop JDBC driver import requires local file paths");
+ }
return invoke("import_jdbc_drivers", { paths });
}
@@ -710,7 +713,10 @@ export async function installJdbcPlugin(): Promise<JdbcPluginStatus> {
return invoke("install_jdbc_plugin");
}
-export async function installJdbcPluginLocal(path: string): Promise<JdbcPluginStatus> {
+export async function installJdbcPluginLocal(path: string | File): Promise<JdbcPluginStatus> {
+ if (typeof path !== "string") {
+ throw new Error("Desktop JDBC plugin install requires a local file path");
+ }
return invoke("install_jdbc_plugin_local", { path });
}
@@ -761,7 +767,10 @@ export async function importAgentsFromZip(path: string | File): Promise<number>
return invoke("import_agents_from_zip", { path });
}
-export async function importAgentJar(dbType: string, path: string): Promise<void> {
+export async function importAgentJar(dbType: string, path: string | File): Promise<void> {
+ if (typeof path !== "string") {
+ throw new Error("Desktop driver JAR import requires a local file path");
+ }
return invoke("import_agent_jar_cmd", { dbType, path });
}