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=()=>{
|
||||
const view=btn.dataset.view;
|
||||
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==='snapshots'){openOverlay('Snapshots');loadSnapshots();}
|
||||
else if(view==='downloads')openOverlay('Downloads');
|
||||
};
|
||||
});
|
||||
|
||||
// Status bar: settings
|
||||
document.getElementById('btnSettings').onclick=async()=>{
|
||||
document.getElementById('instrumentLabel').textContent=currentChannel.charAt(0).toUpperCase()+currentChannel.slice(1).replace('_',' ');
|
||||
openOverlay('Settings');
|
||||
await loadAudioProfiles();await loadBtStatus();await loadBtMidi();await loadHotspotStatus();
|
||||
await loadNetworkInfo();await loadSystemInfo();await doWifiScan();
|
||||
loadAudioDevices();loadChInstrumentState();
|
||||
// Status bar: settings → navigate to full settings page
|
||||
document.getElementById('btnSettings').onclick=()=>{
|
||||
window.location.href='/settings';
|
||||
};
|
||||
|
||||
// Close all overlays
|
||||
|
||||
Reference in New Issue
Block a user