chore: 优化更新策略及文案

This commit is contained in:
digua
2025-12-24 22:14:02 +08:00
parent 3d899ef613
commit c82334b1ad
2 changed files with 20 additions and 2 deletions
+11 -2
View File
@@ -70,8 +70,17 @@ const checkUpdate = (win) => {
} else if (Array.isArray(info.releaseNotes)) {
releaseNotes = info.releaseNotes.map((note) => note.note || note).join('\n')
}
// 简单清理 HTML 标签
releaseNotes = releaseNotes.replace(/<[^>]*>/g, '').trim()
// 简单清理 HTML 标签,合并连续空行,截断下载说明
releaseNotes = releaseNotes
.replace(/<[^>]*>/g, '')
.replace(/\n{2,}/g, '\n')
.trim()
// 如果包含"下载说明",截断该部分及之后的内容
const downloadGuideIndex = releaseNotes.indexOf('下载说明')
if (downloadGuideIndex > 0) {
releaseNotes = releaseNotes.substring(0, downloadGuideIndex).trim()
}
}
const detail = releaseNotes
@@ -89,6 +89,15 @@ onMounted(() => {
</UButton>
</div>
</div>
<!-- 更新策略提示 -->
<UAlert
class="mt-3"
color="info"
variant="subtle"
icon="i-heroicons-light-bulb"
title="更新策略"
description="项目前期更新频繁,为避免打扰,小版本不会自动提醒,仅中版本以上才会推送。如需获取小版本更新,需手动点击检查更新。"
/>
</div>
<!-- 隐私设置 -->