fix(updater): show real app version and release notes

This commit is contained in:
t8y2
2026-05-12 15:15:46 +08:00
parent 724813c72a
commit 01c4b744ef
6 changed files with 128 additions and 7 deletions
+1
View File
@@ -701,6 +701,7 @@ onUnmounted(() => {
<AppDialogs
:show-connection-dialog="showConnectionDialog"
:show-settings-dialog="showSettingsDialog"
:app-version="appVersion"
:show-danger-dialog="showDangerDialog"
:danger-sql="dangerSql"
@update:show-connection-dialog="showConnectionDialog = $event"
@@ -34,6 +34,7 @@ const { toast } = useToast();
const props = defineProps<{
open: boolean;
initialTab?: string;
appVersion?: string;
}>();
const emit = defineEmits<{
@@ -113,6 +114,7 @@ function setAppLayout(value: "separated" | "classic") {
const activeSettingsTab = ref("editor");
const isWeb = !isTauriRuntime();
const displayedAppVersion = computed(() => (props.appVersion ? `v${props.appVersion}` : ""));
function openExternalUrl(url: string) {
if (isTauriRuntime()) {
@@ -933,7 +935,12 @@ watch(
<div class="text-lg font-semibold">DBX</div>
<p class="text-sm text-muted-foreground">{{ t("settings.aboutDescription") }}</p>
</div>
<div class="rounded-md border bg-background px-2 py-1 text-xs text-muted-foreground">v0.5.0</div>
<div
v-if="displayedAppVersion"
class="rounded-md border bg-background px-2 py-1 text-xs text-muted-foreground"
>
{{ displayedAppVersion }}
</div>
</div>
</div>
+2
View File
@@ -25,6 +25,7 @@ const props = defineProps<{
showConnectionDialog: boolean;
showSettingsDialog: boolean;
settingsInitialTab?: string;
appVersion?: string;
showDangerDialog: boolean;
dangerSql: string;
}>();
@@ -102,6 +103,7 @@ watch(
<EditorSettingsDialog
:open="showSettingsDialog"
:initial-tab="settingsInitialTab || 'editor'"
:app-version="appVersion"
@update:open="emit('update:showSettingsDialog', $event)"
/>
<DangerConfirmDialog