refactor(更新中心): E方案重设计更新条目 + 已忽略沉底 + 复用app.update显示更新时间 + 安全加固

- UpdateCenterItem.vue: 改为单行紧凑卡片,显示 包名·当前→新版本、来源标签、更新时间(品牌色)、大小;已忽略项淡化
- updateCenter.ts: filteredItems 将已忽略项沉底到列表末尾
- UpdateCenterList/Modal + App.vue: 透传全局 apps,用 app.json 的 Update 字段(Date.parse)推算 updateTime,零额外网络请求
- typedefinition.ts + update-center/types.ts: 新增可选 updateTime 字段
- install-manager.ts: launch-app 补 pkgname.length > 256 长度限制(防 DoS)
- index.ts: close 事件先 clearTimeout 防抖定时器再同步保存窗口状态(消除竞态)
- App.vue: fetchWithRetry 重试 3→2、延迟 1000→500ms(体验优化)
- 7维审计通过;AI审查2阻断项(getIconUrl防护/fetchWithRetry泛型)经核实为误报
This commit is contained in:
xiyidaiwa
2026-08-11 23:54:00 +08:00
parent aef9ccd1ec
commit 30e1bc4840
10 changed files with 167 additions and 91 deletions
+2
View File
@@ -483,6 +483,8 @@ async function createWindow() {
mainWindow.on("close", (event) => {
if (allowAppExit) {
// 真正退出前同步保存最终窗口尺寸(防抖可能尚未触发)
// 先清除尚未触发的防抖定时器,避免旧定时器随后覆盖本次同步写入
if (saveBoundsTimer) clearTimeout(saveBoundsTimer);
const { width, height, x, y } = mainWindow.getBounds();
saveWindowState({
width,