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。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
fix: stabilize custom theme integration
t8y285e2cf1f2fce
diff --git a/apps/desktop/src/i18n/locales/it.ts b/apps/desktop/src/i18n/locales/it.tsindex c50d87c2a9..eb402a80a7 100644--- a/apps/desktop/src/i18n/locales/it.ts+++ b/apps/desktop/src/i18n/locales/it.ts@@ -1791,6 +1791,38 @@ export default {shortcutPressShortcut: "Premi scorciatoia",shortcutConflict: "Questa scorciatoia è in conflitto con un'altra azione nello stesso ambito.",preview: "Anteprima in tempo reale",+ customTheme: "Tema personalizzato",+ customThemeConfigure: "Configura tema personalizzato",+ customThemeTitle: "Configurazione tema personalizzato",+ customThemeMyThemes: "I miei temi",+ customThemeNewTheme: "Nuovo tema",+ customThemeVisualEdit: "Editor visuale",+ customThemeJsonConfig: "Configurazione JSON",+ customThemeLivePreview: "Anteprima in tempo reale",+ customThemePreviewExample: "Esempio di query",+ customThemePreset: "Tema predefinito",+ customThemeSelectPreset: "Seleziona tema predefinito...",+ customThemeApply: "Applica",+ customThemePasteImport: "Importa da testo incollato",+ customThemeExportJson: "Esporta JSON",+ customThemeSaveAndApply: "Salva e applica",+ customThemeKeyword: "Parola chiave",+ customThemeField: "Campo/Variabile",+ customThemeFunction: "Funzione",+ customThemeString: "Stringa",+ customThemeNumber: "Numero",+ customThemeComment: "Commento",+ customThemeTable: "Tabella",+ customThemeOperator: "Operatore",+ customThemeType: "Tipo",+ customThemeBuiltin: "Integrato",+ customThemeBackground: "Sfondo",+ customThemeForeground: "Primo piano",+ customThemeDefaultName: "Tema personalizzato",+ customThemeCopySuffix: " Copia",+ customThemeApplied: 'Schema colori "{name}" applicato',+ customThemeKeepOne: "Mantieni almeno un tema",+ customThemeJsonError: "Formato JSON non valido, controlla",jdbcPlugin: "Plugin DBX JDBC",jdbcPluginInstall: "Installa plugin JDBC",jdbcPluginInstallSuccess: "Plugin JDBC installato",diff --git a/apps/desktop/src/i18n/locales/pt-BR.ts b/apps/desktop/src/i18n/locales/pt-BR.tsindex 23f102880d..99b1f99364 100644--- a/apps/desktop/src/i18n/locales/pt-BR.ts+++ b/apps/desktop/src/i18n/locales/pt-BR.ts@@ -1781,6 +1781,38 @@ export default {shortcutPressShortcut: "Pressione o atalho",shortcutConflict: "Este atalho conflita com outra ação no mesmo escopo.",preview: "Pré-visualização ao vivo",+ customTheme: "Tema personalizado",+ customThemeConfigure: "Configurar tema personalizado",+ customThemeTitle: "Configuração do tema personalizado",+ customThemeMyThemes: "Meus temas",+ customThemeNewTheme: "Novo tema",+ customThemeVisualEdit: "Editor visual",+ customThemeJsonConfig: "Configuração JSON",+ customThemeLivePreview: "Pré-visualização ao vivo",+ customThemePreviewExample: "Exemplo de consulta",+ customThemePreset: "Tema predefinido",+ customThemeSelectPreset: "Selecionar tema predefinido...",+ customThemeApply: "Aplicar",+ customThemePasteImport: "Importar colado",+ customThemeExportJson: "Exportar JSON",+ customThemeSaveAndApply: "Salvar e aplicar",+ customThemeKeyword: "Palavra-chave",+ customThemeField: "Campo/Variável",+ customThemeFunction: "Função",+ customThemeString: "String",+ customThemeNumber: "Número",+ customThemeComment: "Comentário",+ customThemeTable: "Tabela",+ customThemeOperator: "Operador",+ customThemeType: "Tipo",+ customThemeBuiltin: "Integrado",+ customThemeBackground: "Plano de fundo",+ customThemeForeground: "Primeiro plano",+ customThemeDefaultName: "Tema personalizado",+ customThemeCopySuffix: " Cópia",+ customThemeApplied: 'Esquema de cores "{name}" aplicado',+ customThemeKeepOne: "Mantenha pelo menos um tema",+ customThemeJsonError: "Formato JSON inválido, verifique",jdbcPlugin: "Plugin JDBC do DBX",jdbcPluginInstall: "Instalar plugin JDBC",jdbcPluginInstallSuccess: "Plugin JDBC instalado",diff --git a/apps/desktop/src/stores/settingsStore.ts b/apps/desktop/src/stores/settingsStore.tsindex 63d8f100ab..341744cc43 100644--- a/apps/desktop/src/stores/settingsStore.ts+++ b/apps/desktop/src/stores/settingsStore.ts@@ -191,7 +191,6 @@ export type DataGridRenderMode = (typeof DATA_GRID_RENDER_MODES)[number];const DISCONNECT_TAB_HANDLING_MODES = ["close-tabs", "keep-tabs-clear-results", "keep-tabs-keep-results"] as const;export type DisconnectTabHandlingMode = (typeof DISCONNECT_TAB_HANDLING_MODES)[number];-// 自定义主题颜色配置export interface CustomThemeColors {keyword: string;field: string;@@ -227,7 +226,7 @@ export interface CustomTheme {}export const DEFAULT_CUSTOM_THEMES: CustomTheme[] = [- { id: "default", name: "自定义", colors: { ...DEFAULT_CUSTOM_THEME_COLORS } },+ { id: "default", name: "Custom", colors: { ...DEFAULT_CUSTOM_THEME_COLORS } },];export interface EditorSettings {@@ -279,7 +278,7 @@ export const EDITOR_THEMES: { value: EditorTheme; label: string; dark: boolean }{ value: "duotone-light", label: "Duotone Light", dark: false },{ value: "duotone-dark", label: "Duotone Dark", dark: true },{ value: "xcode", label: "Xcode", dark: false },- { value: "custom", label: "Custom (可自定义)", dark: true },+ { value: "custom", label: "Custom", dark: true },];const EDITOR_THEME_VALUES = new Set<EditorTheme>(EDITOR_THEMES.map((theme) => theme.value));@@ -438,15 +437,14 @@ export function normalizeEditorSettings(settings: Partial<EditorSettings>, exist},customThemes: (() => {if (Array.isArray(settings.customThemes) && settings.customThemes.length > 0) {- // 自动重命名"默认"为"自定义"- return settings.customThemes.map((theme) => (theme.name === "默认" ? { ...theme, name: "自定义" } : theme));+ return settings.customThemes.map((theme) => (theme.name === "默认" ? { ...theme, name: "Custom" } : theme));}return [...(settings.customThemeColors? [{id: "migrated",- name: "已迁移",+ name: "Migrated",colors: { ...DEFAULT_CUSTOM_THEME_COLORS, ...settings.customThemeColors },},]@@ -627,7 +625,6 @@ export const useSettingsStore = defineStore("settings", () => {if (partial.activeCustomThemeId !== undefined) {editorSettings.value.activeCustomThemeId = partial.activeCustomThemeId;}- // 同步 customThemeColors 为当前激活主题的颜色(兼容回退逻辑)if (partial.customThemes !== undefined || partial.activeCustomThemeId !== undefined) {const themes = editorSettings.value.customThemes;const activeId = editorSettings.value.activeCustomThemeId;diff --git a/package.json b/package.jsonindex c0067288e1..61802caf8a 100644--- a/package.json+++ b/package.json@@ -1,12 +1,8 @@{"name": "dbx",- "private": true,"version": "0.5.29",+ "private": true,"type": "module",- "packageManager": "[email protected]",- "engines": {- "node": ">=22.13.0"- },"scripts": {"dev": "vite --config apps/desktop/vite.config.ts","dev:tauri": "tauri dev",@@ -38,6 +34,7 @@"@codemirror/state": "^6.6.0","@codemirror/theme-one-dark": "^6.1.3","@codemirror/view": "^6.43.0",+ "@lezer/highlight": "^1.2.3","@lucide/vue": "1.17.0","@msgpack/msgpack": "^3.1.3","@tauri-apps/api": "^2.11.0",@@ -73,7 +70,6 @@"vue-virtual-scroller": "^3.0.4"},"devDependencies": {- "@lezer/highlight": "^1.2.3","@oxfmt/binding-darwin-arm64": "0.53.0","@oxlint/binding-darwin-arm64": "1.68.0","@tailwindcss/vite": "^4.3.0",@@ -91,14 +87,18 @@"vite": "^8.0.16","vue-tsc": "^3.3.3"},+ "lint-staged": {+ "apps/desktop/src/**/*.{ts,vue}": "oxfmt"+ },+ "engines": {+ "node": ">=22.13.0"+ },+ "packageManager": "[email protected]","pnpm": {"onlyBuiltDependencies": ["better-sqlite3","esbuild","keytar"]- },- "lint-staged": {- "apps/desktop/src/**/*.{ts,vue}": "oxfmt"}}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex e5a7ab7c7a..cbdccd599a 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -38,6 +38,9 @@ importers:'@codemirror/view':specifier: ^6.43.0version: 6.43.0+ '@lezer/highlight':+ specifier: ^1.2.3+ version: 1.2.3'@lucide/vue':specifier: 1.17.0version: 1.17.0([email protected]([email protected]))@@ -138,9 +141,6 @@ importers:specifier: ^3.0.4version: 3.0.4([email protected]([email protected]))devDependencies:- '@lezer/highlight':- specifier: ^1.2.3- version: 1.2.3'@oxfmt/binding-darwin-arm64':specifier: 0.53.0version: 0.53.0diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.tomlindex ecb61b4296..f44bb0268b 100644--- a/src-tauri/Cargo.toml+++ b/src-tauri/Cargo.toml@@ -20,7 +20,7 @@ serde = { version = "1.0", features = ["derive"] }serde_json = "1.0"base64 = "0.22"log = "0.4"-tauri = { version = "2.10.3", features = ["tray-icon", "custom-protocol"] }+tauri = { version = "2.10.3", features = ["tray-icon"] }tauri-plugin-log = "2"tokio-postgres = { version = "0.7", features = ["with-chrono-0_4", "with-uuid-1", "with-serde_json-1"] }deadpool-postgres = { version = "0.14", features = ["rt_tokio_1"] }