dashboard: order kind/status chips (单词/词组; 未学/学习中/已掌握)
This commit is contained in:
@@ -358,9 +358,9 @@ panel({
|
||||
bar: "itembar", tbl: "itemtbl", pg: "itempg",
|
||||
rows: DATA.items.filter(i => i.kind !== "expression"),
|
||||
groups: [
|
||||
{ key: "kind", label: "类型", names: { word: "单词", phrase: "词组" } },
|
||||
{ key: "kind", label: "类型", order: ["word","phrase"], names: { word: "单词", phrase: "词组" } },
|
||||
{ key: "level", label: "等级", order: ["小学","中考","高考","CET4","CET6","考研","TOEFL","GRE"] },
|
||||
{ key: "status", label: "状态", names: { new: "未学", learning: "学习中", known: "已掌握" } },
|
||||
{ key: "status", label: "状态", order: ["new","learning","known"], names: { new: "未学", learning: "学习中", known: "已掌握" } },
|
||||
],
|
||||
fields: ["item", "meaning", "context"],
|
||||
head: `<thead><tr><th>id</th><th>条目</th><th>等级</th><th>释义</th><th>上下文</th><th>状态</th></tr></thead><tbody>`,
|
||||
@@ -373,7 +373,7 @@ panel({
|
||||
bar: "exprbar", tbl: "exprtbl", pg: "exprpg",
|
||||
rows: DATA.items.filter(i => i.kind === "expression"),
|
||||
groups: [{ key: "level", label: "等级", order: ["小学","中考","高考","CET4","CET6","考研","TOEFL","GRE"] },
|
||||
{ key: "status", label: "状态", names: { new: "未学", learning: "学习中", known: "已掌握" } }],
|
||||
{ key: "status", label: "状态", order: ["new","learning","known"], names: { new: "未学", learning: "学习中", known: "已掌握" } }],
|
||||
fields: ["item", "meaning", "context"],
|
||||
head: `<thead><tr><th>id</th><th>条目</th><th>等级</th><th>翻译 / 用法</th><th>例句</th><th>状态</th></tr></thead><tbody>`,
|
||||
row: i => `<tr><td class="mono idc">${esc(i.id)}</td><td><b>${esc(i.item)}</b></td><td>${esc(i.level)}</td><td>${esc(i.meaning)}</td><td class="muted">${esc(i.context)}</td><td>${badge(i.status)}</td></tr>`,
|
||||
@@ -384,7 +384,7 @@ SCRIPT_GRAMMAR = r"""
|
||||
panel({
|
||||
bar: "grambar", tbl: "gramtbl", pg: "grampg",
|
||||
rows: DATA.grammar,
|
||||
groups: [{ key: "status", label: "状态", names: { new: "未学", learning: "学习中", known: "已掌握" } }],
|
||||
groups: [{ key: "status", label: "状态", order: ["new","learning","known"], names: { new: "未学", learning: "学习中", known: "已掌握" } }],
|
||||
fields: ["issue", "rule", "examples"],
|
||||
head: `<thead><tr><th>id</th><th>类别</th><th>问题</th><th>正确规则</th><th>例子</th><th>状态</th><th>次数</th></tr></thead><tbody>`,
|
||||
row: g => `<tr><td class="mono idc">${esc(g.id)}</td><td>${esc(g.category)}</td><td>${esc(g.issue)}</td><td class="muted">${esc(g.rule)}</td><td class="fx mono">${esc(g.examples)}</td><td>${badge(g.status)}</td><td>${g.count}</td></tr>`,
|
||||
|
||||
Reference in New Issue
Block a user