Update script.js

This commit is contained in:
Broque Thomas 2025-10-04 22:23:34 -07:00
parent 09b4638279
commit c5c884f01f

View file

@ -10164,6 +10164,9 @@ async function openDownloadMissingModalForTidal(virtualPlaylistId, playlistName,
function initializeSyncPage() { function initializeSyncPage() {
// Logic for tab switching // Logic for tab switching
const tabButtons = document.querySelectorAll('.sync-tab-button'); const tabButtons = document.querySelectorAll('.sync-tab-button');
const syncSidebar = document.querySelector('.sync-sidebar');
const syncContentArea = document.querySelector('.sync-content-area');
tabButtons.forEach(button => { tabButtons.forEach(button => {
button.addEventListener('click', () => { button.addEventListener('click', () => {
const tabId = button.dataset.tab; const tabId = button.dataset.tab;
@ -10177,6 +10180,17 @@ function initializeSyncPage() {
content.classList.remove('active'); content.classList.remove('active');
}); });
document.getElementById(`${tabId}-tab-content`).classList.add('active'); document.getElementById(`${tabId}-tab-content`).classList.add('active');
// Show/hide sidebar based on active tab
if (syncSidebar && syncContentArea) {
if (tabId === 'spotify') {
syncSidebar.style.display = '';
syncContentArea.style.gridTemplateColumns = '2.5fr 0.75fr';
} else {
syncSidebar.style.display = 'none';
syncContentArea.style.gridTemplateColumns = '1fr';
}
}
}); });
}); });