feat: add version footer to dashboard UI (v1.2.1)

- /health endpoint now includes version field
- Footer displays 'sofarr vX.Y.Z' fetched on page load
- Subtle .app-version styling (smaller, dimmed)
- Bump version to 1.2.1, update CHANGELOG
This commit is contained in:
2026-05-17 20:34:59 +01:00
parent ad024ab87b
commit 6a8ca90fd3
6 changed files with 30 additions and 3 deletions

View File

@@ -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 => {

View File

@@ -112,6 +112,7 @@
<footer class="app-footer">
<p>Ensure your media is tagged with your username in Sonarr/Radarr to match downloads to users.</p>
<p class="app-version" id="app-version"></p>
</footer>
</div>
</div>

View File

@@ -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;