diff --git a/CHANGELOG.md b/CHANGELOG.md index c27dfa5..2ea11bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm --- +## [1.2.1] - 2026-05-17 + +### Added + +- **Version footer** — the dashboard footer now displays the running app version (e.g. `sofarr v1.2.1`), fetched from the `/health` endpoint on page load. + +--- + ## [1.2.0] - 2025-05-17 ### Security diff --git a/package.json b/package.json index 15f196b..32cc3e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sofarr", - "version": "1.2.0", + "version": "1.2.1", "description": "A personal media download dashboard that shows your downloads 'so far' while you relax on the sofa waiting for your *arr services to finish", "main": "server/index.js", "scripts": { diff --git a/public/app.js b/public/app.js index 8d1a7cb..3fde051 100644 --- a/public/app.js +++ b/public/app.js @@ -27,13 +27,25 @@ document.addEventListener('DOMContentLoaded', () => { initThemeSwitcher(); initTabs(); initHistoryControls(); - + loadAppVersion(); + document.getElementById('login-form').addEventListener('submit', handleLogin); document.getElementById('logout-btn').addEventListener('click', handleLogout); document.getElementById('show-all-toggle').addEventListener('change', handleShowAllToggle); document.getElementById('status-btn').addEventListener('click', toggleStatusPanel); }); +function loadAppVersion() { + fetch('/health') + .then(r => r.json()) + .then(data => { + if (data.version) { + document.getElementById('app-version').textContent = `sofarr v${data.version}`; + } + }) + .catch(() => {}); +} + function initThemeSwitcher() { const saved = localStorage.getItem('sofarr-theme') || 'light'; document.querySelectorAll('.theme-btn').forEach(btn => { diff --git a/public/index.html b/public/index.html index 75b9189..bbe87a4 100644 --- a/public/index.html +++ b/public/index.html @@ -112,6 +112,7 @@ diff --git a/public/style.css b/public/style.css index e7f1fda..8eb5dcf 100644 --- a/public/style.css +++ b/public/style.css @@ -866,6 +866,12 @@ body { opacity: 0.8; } +.app-version { + font-size: 0.72rem; + opacity: 0.5; + margin-top: 4px; +} + /* ===== Login ===== */ .login-container { display: flex; diff --git a/server/index.js b/server/index.js index 0cada4e..3e40136 100644 --- a/server/index.js +++ b/server/index.js @@ -197,7 +197,7 @@ app.use(express.json({ limit: '64kb' })); // prevent oversized JSON payloads // Used by Docker HEALTHCHECK and orchestrators. // --------------------------------------------------------------------------- app.get('/health', (req, res) => { - res.json({ status: 'ok', uptime: process.uptime() }); + res.json({ status: 'ok', uptime: process.uptime(), version }); }); app.get('/ready', (req, res) => {