add(ui/ux): show the running version and build stamp in the header

This commit is contained in:
Steppenstreuner
2026-09-01 17:50:50 +02:00
parent d9b4c95ca6
commit 8e7be708b2
10 changed files with 73 additions and 4 deletions
+12
View File
@@ -1619,9 +1619,21 @@ function onLangChange() {
if (scanItems.length) renderImportTable();
}
// ---- version ----
// the build stamp is the quickest answer to "did the redeploy arrive?"
async function showVersion() {
try {
const v = await api("/api/version");
// the version alone rarely moves, so the stamp is what tells deploys apart
$("#app-version").textContent = `v${v.version} · ${v.build || v.built_at}`;
$("#app-version").title = `${v.built_at} UTC${v.build ? " · " + v.build : ""}`;
} catch {}
}
// ---- init ----
applyI18n();
updateLangButton();
endLibraryEdit();
loadLibraries();
refreshMissingBadge();
showVersion();
+1 -1
View File
@@ -11,7 +11,7 @@
</head>
<body>
<header>
<h1>📚 wordarr</h1>
<h1>📚 wordarr <span id="app-version"></span></h1>
<nav>
<button data-view="search" class="active" data-i18n="nav.search"></button>
<button data-view="missing">
+1
View File
@@ -10,6 +10,7 @@ header {
padding: 0.8rem; background: var(--panel); border-bottom: 1px solid var(--border);
}
h1 { font-size: 1.2rem; }
#app-version { color: var(--muted); font-size: 0.72rem; font-weight: 400; font-variant-numeric: tabular-nums; }
nav { display: flex; gap: 0.4rem; flex-wrap: wrap; }
nav button { background: none; border: none; color: var(--muted); padding: 0.5rem 0.9rem; cursor: pointer; border-radius: 4px; font-size: 0.95rem; }
nav button.active, nav button:hover { color: var(--text); background: var(--bg); }