From e1a44a337343c3e48f1bb0191afa35d902908259 Mon Sep 17 00:00:00 2001 From: Lang Date: Wed, 14 Oct 2026 21:41:09 +0800 Subject: [PATCH] dashboard(index): mastery overview numbers in X/total format --- actions/build_dashboard.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/actions/build_dashboard.py b/actions/build_dashboard.py index be52fab..5cf9c0c 100644 --- a/actions/build_dashboard.py +++ b/actions/build_dashboard.py @@ -290,11 +290,12 @@ const ov = DATA.overview; const glyph = {word:"单词", phrase:"词组", expression:"表达", grammar:"语法"}; document.getElementById("overview").innerHTML = Object.keys(glyph).map(k => { const o = ov[k]; + const T = o.total; const parts = k === "grammar" - ? `待修正 ${o.fix} · 已克服 ${o.known||0}` - : `未学 ${o.new||0} · 学习中 ${o.learning} · 已掌握 ${o.known} · 待修正 ${o.fix}`; + ? `待修正 ${o.fix}/${T} · 已克服 ${o.known||0}/${T}` + : `未学 ${o.new||0}/${T} · 学习中 ${o.learning}/${T} · 已掌握 ${o.known}/${T} · 待修正 ${o.fix}/${T}`; return `
${glyph[k]}
-
${o.total}
${parts}
`; +
${o.known||0}/${T}
${parts}
`; }).join(""); """ + CHART_JS