fix: 优化升级进度条体验,每行日志递增进度并显示阶段提示

This commit is contained in:
晴天
2026-02-28 12:50:42 +08:00
parent 3fd98623c0
commit 434cc5eccd
2 changed files with 10 additions and 4 deletions

View File

@@ -176,7 +176,10 @@ export function showUpgradeModal() {
},
setProgress(pct) {
fill.style.width = pct + '%'
text.textContent = pct >= 100 ? '完成' : `升级中... ${pct}%`
if (pct >= 100) text.textContent = '完成'
else if (pct >= 75) text.textContent = '正在安装...'
else if (pct >= 30) text.textContent = '正在下载依赖...'
else text.textContent = '准备中...'
},
setDone(msg) {
text.textContent = msg || '升级完成'