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。

feat: add Docker update instructions for non-desktop users in UpdateDialog

t8y26beae4e1399e
diff --git a/src/components/layout/UpdateDialog.vue b/src/components/layout/UpdateDialog.vue
index e6bcd0b510..7596a74e47 100644
--- a/src/components/layout/UpdateDialog.vue
+++ b/src/components/layout/UpdateDialog.vue
@@ -6,6 +6,7 @@ import {
Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle,
} from "@/components/ui/dialog";
import type { UpdateInfo } from "@/lib/api";
+import { isTauriRuntime } from "@/lib/tauriRuntime";
const open = defineModel<boolean>("open", { required: true });
@@ -24,6 +25,7 @@ const emit = defineEmits<{
}>();
const { t } = useI18n();
+const isDesktop = isTauriRuntime();
</script>
<template>
@@ -42,17 +44,22 @@ const { t } = useI18n();
<div v-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>
+ <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> 更新
+ </p>
</div>
<DialogFooter>
<Button 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>
- <Button v-if="updateReady" @click="emit('restart')">{{ t('updates.restart') }}</Button>
- <Button v-else-if="isDownloadingUpdate" disabled>
- <Loader2 class="h-4 w-4 animate-spin" />
- {{ t('updates.downloading', { progress: downloadProgress }) }}
- </Button>
- <Button v-else @click="emit('download-and-install')">{{ t('updates.downloadAndInstall') }}</Button>
+ <template v-if="isDesktop">
+ <Button v-if="updateReady" @click="emit('restart')">{{ t('updates.restart') }}</Button>
+ <Button v-else-if="isDownloadingUpdate" disabled>
+ <Loader2 class="h-4 w-4 animate-spin" />
+ {{ t('updates.downloading', { progress: downloadProgress }) }}
+ </Button>
+ <Button v-else @click="emit('download-and-install')">{{ t('updates.downloadAndInstall') }}</Button>
+ </template>
</template>
<Button v-else-if="updateCheckMessage" @click="emit('open-latest-release')">{{ t('updates.openRelease') }}</Button>
</DialogFooter>