feat: changelog display improvement

* feat: 添加旧版本changelog的modal

* style: 调整发布说明对话框的样式,移除背景颜色
This commit is contained in:
RC-CHN
2025-11-12 14:54:03 +08:00
committed by GitHub
parent b360c8446e
commit 27af9ebb6b
3 changed files with 40 additions and 7 deletions
@@ -56,6 +56,9 @@
"linkText": "View master branch commit history (click copy on the right to copy)",
"confirm": "Confirm Switch"
},
"releaseNotes": {
"title": "Release Notes"
},
"dashboardUpdate": {
"title": "Update Dashboard to Latest Version Only",
"currentVersion": "Current Version",
@@ -55,6 +55,9 @@
"linkText": "查看 master 分支提交记录(点击右边的 copy 即可复制)",
"confirm": "确定切换"
},
"releaseNotes": {
"title": "更新日志"
},
"dashboardUpdate": {
"title": "单独更新管理面板到最新版本",
"currentVersion": "当前版本",
@@ -43,6 +43,11 @@ let devCommits = ref<{ sha: string; date: string; message: string }[]>([]);
let updatingDashboardLoading = ref(false);
let installLoading = ref(false);
// Release Notes Modal
let releaseNotesDialog = ref(false);
let selectedReleaseNotes = ref('');
let selectedReleaseTag = ref('');
let tab = ref(0);
const releasesHeader = computed(() => [
@@ -283,6 +288,12 @@ function toggleDarkMode() {
theme.global.name.value = newTheme;
}
function openReleaseNotesDialog(body: string, tag: string) {
selectedReleaseNotes.value = body;
selectedReleaseTag.value = tag;
releaseNotesDialog.value = true;
}
getVersion();
checkUpdate();
@@ -417,13 +428,10 @@ commonStore.getStartTime();
</v-chip>
</div>
</template>
<template v-slot:item.body="{ item }: { item: { body: string } }">
<v-tooltip :text="item.body">
<template v-slot:activator="{ props }">
<v-btn v-bind="props" rounded="xl" variant="tonal" color="primary" size="x-small">{{
t('core.header.updateDialog.table.view') }}</v-btn>
</template>
</v-tooltip>
<template v-slot:item.body="{ item }: { item: { body: string; tag_name: string } }">
<v-btn @click="openReleaseNotesDialog(item.body, item.tag_name)" rounded="xl" variant="tonal"
color="primary" size="x-small">{{
t('core.header.updateDialog.table.view') }}</v-btn>
</template>
<template v-slot:item.switch="{ item }: { item: { tag_name: string } }">
<v-btn @click="switchVersion(item.tag_name)" rounded="xl" variant="plain" color="primary">
@@ -502,6 +510,25 @@ commonStore.getStartTime();
</v-card>
</v-dialog>
<!-- Release Notes Modal -->
<v-dialog v-model="releaseNotesDialog" max-width="800">
<v-card>
<v-card-title class="text-h5">
{{ t('core.header.updateDialog.releaseNotes.title') }}: {{ selectedReleaseTag }}
</v-card-title>
<v-card-text
style="font-size: 14px; max-height: 400px; overflow-y: auto;"
v-html="md.render(selectedReleaseNotes)" class="markdown-content">
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="blue-darken-1" variant="text" @click="releaseNotesDialog = false">
{{ t('core.common.close') }}
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<!-- 账户对话框 -->
<v-dialog v-model="dialog" persistent :max-width="$vuetify.display.xs ? '90%' : '500'">
<template v-slot:activator="{ props }">