feedback7 stats: the local statistics page, ported from PR #323 by @2321Robin as submitted (record store ui/stats.js, viewer screens/stats.js, stats.css, entries on the title / lobby / room screens, 20 tests); golden: unchanged

- public/js/ui/stats.js: one record per finished match in localStorage (sp.pref.stats, envelope {v, records}, at most
  1000, quota shrink of the oldest), content-id dedupe of the lobby's result replay, a MIGRATIONS chain and
  normalizeRecord (defaults for missing fields, unknown fields kept, a newer envelope refused), merge-by-id export /
  import, aggregateStats.
- public/js/screens/stats.js: the viewer (总览 / 策略 / 称号 / 战斗累计 / 最近对局, a row re-views that match's
  settlement), 导出 / 导入 / 清空.
- Applied from the PR's own diff after reading it in full (no network, no new dependency, server untouched); only the
  UI strings of the page are added to the four packs (en from the PR; ja / ko / zh-TW translated for this commit).
- The follow-up commits rework the page (the counting rule for matches left early, storage bounds, the layout).
- Tests: test/ui/stats.test.js 20 / 20; i18n extract 0, check --all --strict clean.
This commit is contained in:
2321Robin authored and sganggs committed 2026-10-08 20:05:09 +08:00
1 parent ae22335cfe
commit 438a6b521a
13 files changed
+1407 -5

No files matched your search

+42 -1
View File
@@ -1059,5 +1059,46 @@
"游戏数据没有载入": "遊戲資料沒有載入",
"{files} 没有下载成功,这一页无法显示;已保存的设置不受影响。请刷新页面;仍不行时,请检查广告拦截插件和网络。": "{files} 沒有下載成功,這一頁無法顯示;已儲存的設定不受影響。請重新整理頁面;仍不行時,請檢查廣告攔截擴充功能和網路。",
"全员无伤!": "全員無傷!",
"生命值减少 −{n}": "生命值減少 −{n}"
"生命值减少 −{n}": "生命值減少 −{n}",
"统计数据": "統計資料",
"统计": "統計",
"对局进行中,暂不能回看历史结算": "對局進行中,暫時無法回看歷史結算",
"总览": "總覽",
"总局数": "總局數",
"胜场": "勝場",
"胜率": "勝率",
"到达隐秘核心": "到達隱秘核心",
"通关隐秘核心": "通關隱秘核心",
"最远回合": "最遠回合",
"累计时长": "累計時長",
"{n} 分": "{n} 分",
"难度": "難度",
"局数": "局數",
"隐秘核心通关": "隱秘核心通關",
"使用局数": "使用局數",
"通过局数": "通過局數",
"通过率": "通過率",
"称号": "稱號",
"战斗累计": "戰鬥累計",
"最近对局": "最近對局",
"时间": "時間",
"模式": "模式",
"结果": "結果",
"点击查看该局结算": "點擊查看該局結算",
"单人": "單人",
"同盟": "同盟",
"胜": "勝",
"负": "負",
"点击任意一行,回看该局结算。": "點擊任一行,回看該局結算。",
"已导出 {n} 条对局记录": "已匯出 {n} 筆對局記錄",
"已导入 {added} 条记录{tail}": "已匯入 {added} 筆記錄{tail}",
"(跳过重复 {skipped} 条)": "(略過重複 {skipped} 筆)",
"没有新记录(全部与现有数据重复)": "沒有新記錄(全部與現有資料重複)",
"导入失败:不是有效的统计导出文件": "匯入失敗:不是有效的統計匯出檔案",
"已清空本机统计数据": "已清空本機統計資料",
"确认清空?": "確認清空?",
"本机数据 · 仅记录本浏览器中你参与的对局": "本機資料 · 僅記錄本瀏覽器中你參與的對局",
"检测到更新版本的统计数据,请先升级客户端再查看,以免覆盖数据。": "偵測到更新版本的統計資料,請先升級用戶端再查看,以免覆蓋資料。",
"还没有记录 —— 完成一局对局后,这里会开始积累。": "還沒有記錄 —— 完成一局對局後,這裡會開始累積。",
"未知": "未知"
}