Skip to content

Commit 096d314

Browse files
author
Admin9705
committed
update
1 parent 391a726 commit 096d314

File tree

2 files changed

+64
-487
lines changed

2 files changed

+64
-487
lines changed

frontend/static/js/new-main.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,14 @@ let huntarrUI = {
9292
} else if (this.currentSection === 'requestarr' || this.currentSection === 'requestarr-history') {
9393
console.log('[huntarrUI] Initialization - showing requestarr sidebar');
9494
this.showRequestarrSidebar();
95+
} else if (this.currentSection === 'apps' || this.currentSection === 'sonarr' || this.currentSection === 'radarr' || this.currentSection === 'lidarr' || this.currentSection === 'readarr' || this.currentSection === 'whisparr' || this.currentSection === 'eros' || this.currentSection === 'prowlarr') {
96+
console.log('[huntarrUI] Initialization - showing apps sidebar');
97+
this.showAppsSidebar();
9598
} else {
9699
// Show main sidebar by default and clear settings sidebar preference
97100
console.log('[huntarrUI] Initialization - showing main sidebar (default)');
98101
localStorage.removeItem('huntarr-settings-sidebar');
102+
localStorage.removeItem('huntarr-apps-sidebar');
99103
this.showMainSidebar();
100104
}
101105

@@ -630,21 +634,20 @@ let huntarrUI = {
630634
// Show history view
631635
this.showRequestarrView('history');
632636
} else if (section === 'apps') {
633-
// Show Apps section with sidebar - similar to Settings
634-
const appsSection = document.getElementById('appsSection');
635-
if (appsSection) {
636-
appsSection.classList.add('active');
637-
appsSection.style.display = 'block';
638-
}
637+
console.log('[huntarrUI] Switching to apps section');
638+
document.getElementById('appsSection').classList.add('active');
639+
document.getElementById('appsSection').style.display = 'block';
639640
if (document.getElementById('appsNav')) document.getElementById('appsNav').classList.add('active');
640641
newTitle = 'Apps';
641642
this.currentSection = 'apps';
642643

643644
// Switch to Apps sidebar
645+
console.log('[huntarrUI] About to call showAppsSidebar()');
644646
this.showAppsSidebar();
647+
console.log('[huntarrUI] Called showAppsSidebar()');
645648

646-
// Show message to select an app
647-
return;
649+
// Set localStorage to maintain Apps sidebar preference
650+
localStorage.setItem('huntarr-apps-sidebar', 'true');
648651
} else if (section === 'sonarr' && document.getElementById('sonarrSection')) {
649652
document.getElementById('sonarrSection').classList.add('active');
650653
document.getElementById('sonarrSection').style.display = 'block';

0 commit comments

Comments
 (0)