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: bundle libodbc into macOS app and improve update UX
t8y2497391266635
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 282fb776b4..56effda9b0 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -63,6 +63,10 @@ jobs:if: startsWith(matrix.platform, 'macos')run: brew install unixodbc+ - name: Bundle ODBC library (macOS)+ if: startsWith(matrix.platform, 'macos')+ run: cp "$(brew --prefix unixodbc)/lib/libodbc.2.dylib" src-tauri/+- name: Install Apple certificate (macOS)if: startsWith(matrix.platform, 'macos')env:diff --git a/.gitignore b/.gitignoreindex caa5426c8f..041d42b5f1 100644--- a/.gitignore+++ b/.gitignore@@ -9,6 +9,7 @@ dist/docs/.next/docs/out/docs/.source/+src-tauri/*.dylib# OS files.DS_Storediff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.jsonindex 811ac26762..a5d9221e2d 100644--- a/src-tauri/tauri.conf.json+++ b/src-tauri/tauri.conf.json@@ -29,6 +29,9 @@"active": true,"targets": "all","createUpdaterArtifacts": true,+ "macOS": {+ "frameworks": ["libodbc.2.dylib"]+ },"icon": ["icons/32x32.png","icons/128x128.png",diff --git a/src/components/layout/UpdateDialog.vue b/src/components/layout/UpdateDialog.vueindex 2434657d56..542165f222 100644--- a/src/components/layout/UpdateDialog.vue+++ b/src/components/layout/UpdateDialog.vue@@ -1,5 +1,7 @@<script setup lang="ts">+import { computed } from "vue";import { useI18n } from "vue-i18n";+import { Marked } from "marked";import { Loader2 } from "lucide-vue-next";import { Button } from "@/components/ui/button";import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog";@@ -8,7 +10,7 @@ import { isTauriRuntime } from "@/lib/tauriRuntime";const open = defineModel<boolean>("open", { required: true });-defineProps<{+const props = defineProps<{updateInfo: UpdateInfo | null;updateCheckMessage: string;isDownloadingUpdate: boolean;@@ -24,11 +26,30 @@ const emit = defineEmits<{const { t } = useI18n();const isDesktop = isTauriRuntime();++const marked = new Marked({ breaks: true, gfm: true });++const renderedNotes = computed(() => {+ if (!props.updateInfo?.release_notes) return "";+ return marked.parse(props.updateInfo.release_notes) as string;+});</script><template><Dialog v-model:open="open">- <DialogContent class="sm:max-w-[520px]">+ <DialogContent+ class="sm:max-w-[520px]"+ @interact-outside="+ (e: Event) => {+ if (isDownloadingUpdate || updateReady) e.preventDefault();+ }+ "+ @escape-key-down="+ (e: Event) => {+ if (isDownloadingUpdate || updateReady) e.preventDefault();+ }+ "+ ><DialogHeader><DialogTitle>{{ updateInfo?.update_available ? t("updates.availableTitle") : t("updates.title") }}</DialogTitle></DialogHeader>@@ -46,10 +67,9 @@ const isDesktop = isTauriRuntime();</p><divv-if="updateInfo?.update_available && updateInfo.release_notes"- class="max-h-48 overflow-auto rounded-md border bg-muted/30 p-3 text-xs whitespace-pre-wrap"- >- {{ updateInfo.release_notes }}- </div>+ class="max-h-48 overflow-auto rounded-md border bg-muted/30 p-3 text-xs [&_h1]:text-sm [&_h1]:font-semibold [&_h1]:mb-1 [&_h2]:text-sm [&_h2]:font-semibold [&_h2]:mb-1 [&_h3]:text-xs [&_h3]:font-semibold [&_h3]:mb-1 [&_ul]:list-disc [&_ul]:pl-4 [&_ul]:my-1 [&_ol]:list-decimal [&_ol]:pl-4 [&_ol]:my-1 [&_li]:my-0.5 [&_p]:my-1 [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_code]:text-[11px] [&_a]:text-primary [&_a]:underline"+ v-html="renderedNotes"+ /><p v-if="!isDesktop && updateInfo?.update_available" class="text-xs text-muted-foreground">Docker 用户请运行<code class="bg-muted px-1 py-0.5 rounded text-[11px]">docker compose pull && docker compose up -d</code>@@ -57,11 +77,16 @@ const isDesktop = isTauriRuntime();</p></div><DialogFooter>- <Button variant="outline" @click="open = false">{{ t("dangerDialog.cancel") }}</Button>+ <Button v-if="!isDownloadingUpdate && !updateReady" variant="outline" @click="open = false">{{+ t("dangerDialog.cancel")+ }}</Button><template v-if="updateInfo?.update_available"><Button variant="outline" @click="emit('open-latest-release')">{{ t("updates.openRelease") }}</Button><template v-if="isDesktop">- <Button v-if="updateReady" @click="emit('restart')">{{ t("updates.restart") }}</Button>+ <div v-if="updateReady" class="flex flex-col items-end gap-1">+ <Button @click="emit('restart')">{{ t("updates.exitAndUpdate") }}</Button>+ <span class="text-xs text-muted-foreground">{{ t("updates.reopenHint") }}</span>+ </div><Button v-else-if="isDownloadingUpdate" disabled><Loader2 class="h-4 w-4 animate-spin" />{{ t("updates.downloading", { progress: downloadProgress }) }}diff --git a/src/composables/useAppUpdater.ts b/src/composables/useAppUpdater.tsindex 7bda596bd1..41f6be28c8 100644--- a/src/composables/useAppUpdater.ts+++ b/src/composables/useAppUpdater.ts@@ -91,8 +91,8 @@ export function useAppUpdater() {async function restartApp() {if (!isTauriRuntime()) return;- const { relaunch } = await import("@tauri-apps/plugin-process");- await relaunch();+ const { exit } = await import("@tauri-apps/plugin-process");+ await exit(0);}return {diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.tsindex 8fce2617c4..381ac9a59a 100644--- a/src/i18n/locales/en.ts+++ b/src/i18n/locales/en.ts@@ -52,6 +52,8 @@ export default {downloading: "Downloading {progress}%",downloadFailed: "Update download failed: {error}",restart: "Restart Now",+ exitAndUpdate: "Exit & Update",+ reopenHint: "Changes will take effect when you reopen the app",},sidebar: {connections: "CONNECTIONS",diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.tsindex 135962a99b..6c13b92b5c 100644--- a/src/i18n/locales/zh-CN.ts+++ b/src/i18n/locales/zh-CN.ts@@ -51,6 +51,8 @@ export default {downloading: "下载中 {progress}%",downloadFailed: "更新下载失败:{error}",restart: "立即重启",+ exitAndUpdate: "退出并更新",+ reopenHint: "更新将在重新打开应用后生效",},sidebar: {connections: "连接",