fix(updater,i18n): 对抗性审查修复(1中 + 3低)
- [中] 手动检查不再丢弃「已下载」事实:runCheck('manual') 原来无条件清
抑制记录,导致下载完成后点「检查更新」会把关于页从「重启安装」退回
「下载」(包已在磁盘)。改为保留 downloaded 记录,只清 announcement
记账;测试 §19 补 manual-check 保持 downloaded 的口径(153 断言)
- website 首帧脚本:?lang= 的 decodeURIComponent 包 try/catch(畸形转义
会在 IIFE 内抛 URIError,跳过 html[lang] 与防闪标记,指定语言被静默
忽略);zh-Hant-TW/zh-Hant-HK/zh-Hant 按 BCP-47 语义判为繁体
(normalize 与 i18n-apply.js 双处同步)
- ZmodemOffers 是 App 兄弟节点,语言切换时父级 children bailout 不重渲染:
订阅 language 并以 tFor 显式翻译(事件回调内的 t() 保留)
- ROADMAP 补录对抗性审查推迟项(周期检查可被设置写入推迟、启动开关
即时生效语义、下载无整体超时、--channel-only/--skip-gitea 矛盾)
This commit is contained in:
1 parent
7c2044fdf4
commit
2027fa3310
6 files changed
+58
-11
No files matched your search
@@ -986,6 +986,28 @@ console.log('a finished download stays finished')
|
||||
ok(s.status === 'available', `a different release starts from 'available' (got '${s.status}')`)
|
||||
ok(s.version === '4.4.2', `and is named (${s.version})`)
|
||||
}
|
||||
|
||||
// A manual check after a finished download must ALSO keep the downloaded
|
||||
// state — the package is on disk, so "downloaded" is the truthful answer, and
|
||||
// folding the install button back into "download" would make the user fetch
|
||||
// what they already have. The manual record drop only discards announcement
|
||||
// bookkeeping, never the on-disk fact.
|
||||
live.emit('update-downloaded', { version: '4.4.2' })
|
||||
await tick()
|
||||
ok(call(Ipc.UPDATE_STATE_GET).status === 'downloaded', 'the new release finishes too')
|
||||
ctl.checkForUpdates = () => {
|
||||
live.emit('checking-for-update')
|
||||
live.emit('update-available', { version: '4.4.2' })
|
||||
return Promise.resolve(null)
|
||||
}
|
||||
{
|
||||
const state = await call(Ipc.UPDATE_CHECK)
|
||||
ok(
|
||||
state.status === 'downloaded' && state.version === '4.4.2',
|
||||
`a manual check keeps a finished download finished (got '${state.status}')`
|
||||
)
|
||||
ok(state.status !== 'checking', 'and is not parked on the spinner')
|
||||
}
|
||||
}
|
||||
|
||||
console.log('balloons respect the visible-window guard')
|
||||
|
||||
Reference in new issue
Block a user