mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-27 15:13:37 +08:00
1.3 KiB
1.3 KiB
v0.5.6
修复
- 检查更新误判"已最新版"为"有可更新"。Feed 里最新版本与当前版本相同时,update check 会错误
地标记为
available,导致用户点击下载时收到No Electron update is available to download的失败。 现在 ElectronUpdaterService 加入 currentVersion 选项,在 check 时对比版本号(自包含的 isNewerVersion, 忽略 prerelease / build 后缀),等版本或旧版本返回 null(up-to-date),避免虚假更新提示。 - 设置 → 关于 页面左右未撑满。AboutSettings 容器被锁定在 max-w-lg(32rem)并居中,在宽屏显示器 上左右留白明显。移除 max-w-lg 和 mx-auto 约束,面板现在左右撑满桌面宽度。
范围
- 桌面端:
desktop/electron/services/updater.ts(isNewerVersion 函数 + 版本比较逻辑)、desktop/electron/main.ts(注入 currentVersion)、desktop/src/pages/Settings.tsx(AboutSettings 宽度)。 - 测试:新增 4 个版本比较回归用例(等版本 / 旧版本 / 新版本 scenarios)。
验证
cd desktop && bun test electron/services/updater.test.ts:14 pass ✅cd desktop && bun run test -- src/__tests__/generalSettings.test.tsx src/stores/updateStore.test.ts:67 pass ✅cd desktop && bun run lint:tsc --noEmit 通过 ✅