Show Sync page in standalone mode, only hide sync buttons

The Sync page was hidden entirely for standalone users, blocking
access to playlist browsing, discovery, and downloads. Now the page
is accessible — only the sync-to-server buttons are hidden since
there's no server to push playlists to.
This commit is contained in:
Broque Thomas 2026-04-18 09:00:55 -07:00
parent 8df5cf3be0
commit 33911a7001

View file

@ -396,12 +396,9 @@ function handleServiceStatusUpdate(data) {
// Update downloads nav badge from status push
if (data.active_downloads !== undefined) _updateDlNavBadge(data.active_downloads);
// Hide sync-related UI for standalone mode (no server to sync playlists to)
// Hide sync buttons (not the page) for standalone mode — playlists still browsable/downloadable
const isSoulsyncStandalone = data.media_server?.type === 'soulsync';
_isSoulsyncStandalone = isSoulsyncStandalone;
const syncNav = document.querySelector('[data-page="sync"]');
if (syncNav) syncNav.style.display = isSoulsyncStandalone ? 'none' : '';
// Hide all sync buttons across the app
document.querySelectorAll('.sync-to-server-btn, [id$="-sync-btn"], [onclick*="startPlaylistSync"], [onclick*="syncPlaylistToServer"], [onclick*="startDecadeSync"]').forEach(btn => {
btn.style.display = isSoulsyncStandalone ? 'none' : '';
});
@ -39271,11 +39268,9 @@ async function fetchAndUpdateServiceStatus() {
// Update downloads nav badge
if (data.active_downloads !== undefined) _updateDlNavBadge(data.active_downloads);
// Hide sync-related UI for standalone mode
// Hide sync buttons (not the page) for standalone mode
const isSoulsyncStandalone2 = data.media_server?.type === 'soulsync';
_isSoulsyncStandalone = isSoulsyncStandalone2;
const syncNav = document.querySelector('[data-page="sync"]');
if (syncNav) syncNav.style.display = isSoulsyncStandalone2 ? 'none' : '';
document.querySelectorAll('.sync-to-server-btn, [id$="-sync-btn"], [onclick*="startPlaylistSync"], [onclick*="syncPlaylistToServer"], [onclick*="startDecadeSync"]').forEach(btn => {
btn.style.display = isSoulsyncStandalone2 ? 'none' : '';
});