mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-05-28 01:57:25 +08:00
chore: 优化更新策略及文案
This commit is contained in:
+11
-2
@@ -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>
|
||||
|
||||
<!-- 隐私设置 -->
|
||||
|
||||
Reference in New Issue
Block a user