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
+11
-5
@@ -323,11 +323,17 @@ async function performCheck(source: CheckSource): Promise<UpdateState> {
|
||||
*/
|
||||
export function runCheck(source: CheckSource = 'manual'): Promise<UpdateState> {
|
||||
// A manual check is an explicit act, so whatever it finds counts as news even
|
||||
// if this run has already dealt with that version: the suppression record is
|
||||
// dropped here — before the in-flight guard, so a click that joins a check
|
||||
// already running gets the same treatment. (A manual DOWNLOAD needs no
|
||||
// equivalent: its entry point never consults the record.)
|
||||
if (source === 'manual') actedRelease = undefined
|
||||
// if this run has already announced that version: the announcement half of the
|
||||
// record is dropped here — before the in-flight guard, so a click that joins a
|
||||
// check already running gets the same treatment. The DOWNLOADED half is kept:
|
||||
// for a release whose package sits on disk, "downloaded" *is* the truthful
|
||||
// answer, and dropping it made update-available report `available` again —
|
||||
// folding the About tab's install button back into "download" for a manual
|
||||
// check on an already-fetched release. (A manual DOWNLOAD needs no equivalent:
|
||||
// its entry point never consults the record.)
|
||||
if (source === 'manual') {
|
||||
actedRelease = actedRelease?.downloaded ? actedRelease : undefined
|
||||
}
|
||||
if (checkInFlight) return checkInFlight
|
||||
const task = performCheck(source)
|
||||
checkInFlight = task
|
||||
|
||||
Reference in new issue
Block a user