diff --git a/public/app.js b/public/app.js index 7981c56..6e5f65e 100644 --- a/public/app.js +++ b/public/app.js @@ -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); diff --git a/public/index.html b/public/index.html index 0067190..68f1457 100644 --- a/public/index.html +++ b/public/index.html @@ -46,7 +46,7 @@