From 79359dba44cf33015d49428d610ff4457ba9a2e1 Mon Sep 17 00:00:00 2001 From: Jonathan Sykes Date: Wed, 1 Jul 2026 04:04:15 +0800 Subject: [PATCH] feat: show app version and server build tag in settings Adds an About section at the bottom of Settings displaying the app version. In WEB mode it fetches /api/version and appends the live server build tag so you can confirm which deploy is running. --- frontend/app.js | 25 +++++++++++++++++++++++++ frontend/styles.css | 1 + 2 files changed, 26 insertions(+) diff --git a/frontend/app.js b/frontend/app.js index c70d6aa..953d3b2 100755 --- a/frontend/app.js +++ b/frontend/app.js @@ -1550,6 +1550,19 @@ async function renderSettings() { + + +
+
About
+
+ + Version + App version and current build. + +
+ v${APP_VERSION} +
+
`; c.appendChild(wrap); @@ -1656,6 +1669,18 @@ async function renderSettings() { $('importBackupBtn').addEventListener('click', () => $('backupFileInput').click()); $('backupFileInput').addEventListener('change', importBackup); + // ---- About: append server build tag (WEB mode only) ---- + if (WEB) { + try { + const res = await fetch('/api/version', { cache: 'no-store' }); + if (res.ok && view.type === 'settings') { + const v = await res.json(); + const el = $('aboutVersion'); + if (el && v.buildTag) el.textContent = `v${v.version || APP_VERSION} · build ${v.buildTag}`; + } + } catch { /* offline — leave the static version in place */ } + } + // ---- Reset ---- $('refreshUiBtn').addEventListener('click', async () => { const btn = $('refreshUiBtn'); diff --git a/frontend/styles.css b/frontend/styles.css index 54bf6ce..06f04ab 100755 --- a/frontend/styles.css +++ b/frontend/styles.css @@ -919,6 +919,7 @@ input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.25); } .set-row small { color: var(--text-dim); font-size: 11.5px; font-weight: 400; line-height: 1.4; max-width: 280px; } .set-row input[type="range"] { width: 150px; } .set-row input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; } +.about-version { color: var(--text-dim); font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; user-select: text; } .set-select { background: var(--bg-3); color: var(--text); border: 1px solid var(--line); border-radius: 9px;