feat(import): 添加 DataGrip 连接导入支持 (#936)

- 新增 datagripImport 模块解析 XML 配置
- 支持从 macOS Keychain 自动填充密码
- 添加 Keychain 读取的 Tauri 命令
- 更新多语言翻译文件
- 集成到侧边栏导入流程中
This commit is contained in:
cl1107 authored and GitHub committed 2026-06-09 16:45:59 +08:00
1 parent 354d21d086
commit 3995524e5d
16 files changed
+691 -6

No files matched your search

@@ -205,7 +205,7 @@ export function useDialogSources() {
}
}
async function onImportClick(source: "dbx" | "navicat" | "dbeaver" = "dbx") {
async function onImportClick(source: "dbx" | "navicat" | "dbeaver" | "datagrip" = "dbx") {
try {
const result = await connectionStore.readImportFile(source);
if (!result) return;
@@ -216,13 +216,20 @@ export function useDialogSources() {
showConfigPassphraseDialog.value = true;
} else {
const { count, layout } = await connectionStore.importConnectionsFromFile(result.content, null);
// For DataGrip imports, read Keychain passwords
let keychainFilled = 0;
if (source === "datagrip" && count > 0) {
keychainFilled = await connectionStore.applyDataGripKeychainPasswords();
}
toast(
count > 0
? source === "navicat"
? t("configExport.importNavicatSuccess", { count })
: source === "dbeaver"
? t("configExport.importDbeaverSuccess", { count })
: t("configExport.importSuccess", { count })
: source === "datagrip"
? t("configExport.importDatagripSuccess", { count: count, filled: keychainFilled })
: t("configExport.importSuccess", { count })
: t("configExport.importNone"),
4000,
);