From a92ab85bc05451813559b28ef695551f586c49f1 Mon Sep 17 00:00:00 2001 From: Gronod Date: Sun, 17 May 2026 23:08:27 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20title=20link=20wired=20via=20JS=20goHome?= =?UTF-8?q?()=20=E2=80=94=20switches=20to=20downloads,=20closes=20status,?= =?UTF-8?q?=20resets=20showAll?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/app.js | 13 +++++++++++++ public/index.html | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) 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 @@