fix: title link wired via JS goHome() — switches to downloads, closes status, resets showAll
Build and Push Docker Image / build (push) Successful in 40s
CI / Security audit (push) Successful in 1m33s
CI / Tests & coverage (push) Successful in 1m56s

This commit is contained in:
2026-05-17 23:08:27 +01:00
parent 57b127ea95
commit a92ab85bc0
2 changed files with 14 additions and 1 deletions
+13
View File
@@ -35,6 +35,7 @@ document.addEventListener('DOMContentLoaded', () => {
document.getElementById('logout-btn').addEventListener('click', handleLogout);
document.getElementById('show-all-toggle').addEventListener('change', handleShowAllToggle);
document.getElementById('status-btn').addEventListener('click', toggleStatusPanel);
document.getElementById('title-home-link').addEventListener('click', e => { e.preventDefault(); goHome(); });
});
function loadAppVersion() {
@@ -64,6 +65,18 @@ function setTheme(theme) {
});
}
function goHome() {
closeStatusPanel();
// Reset showAll if active
if (showAll) {
showAll = false;
const toggle = document.getElementById('show-all-toggle');
if (toggle) toggle.checked = false;
startSSE();
}
activateTab('downloads', true);
}
function initTabs() {
const savedTab = localStorage.getItem('sofarr-active-tab') || 'downloads';
activateTab(savedTab, false);