v0.6.1: show hero English name and abbr on detail page.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
voson
2026-07-30 07:33:48 +08:00
co-authored by Cursor
parent 7c9e54e5eb
commit 1aa6710e39
6 changed files with 34 additions and 7 deletions
+12
View File
@@ -2928,6 +2928,18 @@ function renderDetail() {
title.className = "detail-name";
title.textContent = hero.name_loc || hero.key;
head.appendChild(title);
const enParts = [];
if (hero.name) enParts.push(hero.name);
const abbrs = (hero.abbr || []).map((a) => String(a || "").trim()).filter(Boolean);
if (abbrs.length) {
enParts.push(abbrs.map((a) => a.toUpperCase()).join(" / "));
}
if (enParts.length) {
const meta = document.createElement("p");
meta.className = "detail-name-meta";
meta.textContent = enParts.join(" · ");
head.appendChild(meta);
}
root.appendChild(head);
const tabDefs = [