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(updates): keep silent update checks badge-only
t8y201666acd9967
diff --git a/apps/desktop/src/composables/useAppUpdater.ts b/apps/desktop/src/composables/useAppUpdater.tsindex 4b780e1410..fefa48ba80 100644--- a/apps/desktop/src/composables/useAppUpdater.ts+++ b/apps/desktop/src/composables/useAppUpdater.ts@@ -4,6 +4,10 @@ import { isTauriRuntime } from "@/lib/tauriRuntime";import { useToast } from "@/composables/useToast";import * as api from "@/lib/api";+export function shouldOpenUpdateDialog(options: { silent?: boolean }) {+ return options.silent !== true;+}+export function useAppUpdater() {const { t } = useI18n();const { toast } = useToast();@@ -32,10 +36,9 @@ export function useAppUpdater() {updateCheckMessage.value = "";try {const info = await api.checkForUpdates();- const wasUpdateAvailable = hasUpdateAvailable.value;updateInfo.value = info;if (info.update_available) {- if (!options.silent || !wasUpdateAvailable) {+ if (shouldOpenUpdateDialog({ silent: options.silent })) {showUpdateDialog.value = true;}} else if (!options.silent) {diff --git a/packages/app-tests/appUpdateBadge.test.ts b/packages/app-tests/appUpdateBadge.test.tsindex 6d66146c56..82551895cb 100644--- a/packages/app-tests/appUpdateBadge.test.ts+++ b/packages/app-tests/appUpdateBadge.test.ts@@ -1,6 +1,16 @@import { readFileSync } from "node:fs";import { strict as assert } from "node:assert";import test from "node:test";+import { shouldOpenUpdateDialog } from "../../apps/desktop/src/composables/useAppUpdater.ts";++test("silent update checks do not auto-open the dialog when an update is available", () => {+ assert.equal(+ shouldOpenUpdateDialog({+ silent: true,+ }),+ false,+ );+});test("toolbar update button can show a red update badge", () => {const source = readFileSync("apps/desktop/src/components/layout/AppToolbar.vue", "utf8");