Make v2 UI Settings button navigate to /settings page
Both the tab bar ⚙ Settings button and the status bar ⚙ button in the v2 UI now redirect to /settings instead of opening an inline overlay. The full settings page has the left sidebar nav with category views.
This commit is contained in:
@@ -786,20 +786,16 @@ function init(){
|
|||||||
btn.onclick=()=>{
|
btn.onclick=()=>{
|
||||||
const view=btn.dataset.view;
|
const view=btn.dataset.view;
|
||||||
if(view==='main'){document.querySelectorAll('.tab-btn').forEach(b=>b.classList.remove('active'));btn.classList.add('active');}
|
if(view==='main'){document.querySelectorAll('.tab-btn').forEach(b=>b.classList.remove('active'));btn.classList.add('active');}
|
||||||
else if(view==='settings')openOverlay('Settings');
|
else if(view==='settings'){window.location.href='/settings';return;}
|
||||||
else if(view==='presets'){openOverlay('Presets');loadPresets();}
|
else if(view==='presets'){openOverlay('Presets');loadPresets();}
|
||||||
else if(view==='snapshots'){openOverlay('Snapshots');loadSnapshots();}
|
else if(view==='snapshots'){openOverlay('Snapshots');loadSnapshots();}
|
||||||
else if(view==='downloads')openOverlay('Downloads');
|
else if(view==='downloads')openOverlay('Downloads');
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
// Status bar: settings
|
// Status bar: settings → navigate to full settings page
|
||||||
document.getElementById('btnSettings').onclick=async()=>{
|
document.getElementById('btnSettings').onclick=()=>{
|
||||||
document.getElementById('instrumentLabel').textContent=currentChannel.charAt(0).toUpperCase()+currentChannel.slice(1).replace('_',' ');
|
window.location.href='/settings';
|
||||||
openOverlay('Settings');
|
|
||||||
await loadAudioProfiles();await loadBtStatus();await loadBtMidi();await loadHotspotStatus();
|
|
||||||
await loadNetworkInfo();await loadSystemInfo();await doWifiScan();
|
|
||||||
loadAudioDevices();loadChInstrumentState();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Close all overlays
|
// Close all overlays
|
||||||
|
|||||||
Reference in New Issue
Block a user