mirror of
https://github.com/smittix/intercept.git
synced 2026-07-12 03:28:11 -07:00
fix: Handle mode URL parameter on index page load
- Read ?mode=X parameter from URL when index.html loads - Automatically switch to the specified mode (e.g., /?mode=aprs) - Fixes navigation from dashboard pages to panel modes like APRS Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2420,6 +2420,17 @@
|
|||||||
|
|
||||||
// Initialize dropdown nav active state
|
// Initialize dropdown nav active state
|
||||||
updateDropdownActiveState();
|
updateDropdownActiveState();
|
||||||
|
|
||||||
|
// Handle mode parameter from URL (e.g., /?mode=aprs)
|
||||||
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
|
const modeParam = urlParams.get('mode');
|
||||||
|
if (modeParam && typeof switchMode === 'function') {
|
||||||
|
// Valid modes that can be switched to
|
||||||
|
const validModes = ['pager', 'sensor', 'rtlamr', 'satellite', 'sstv', 'wifi', 'bluetooth', 'listening', 'aprs', 'tscm', 'spystations', 'meshtastic'];
|
||||||
|
if (validModes.includes(modeParam)) {
|
||||||
|
switchMode(modeParam);
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Toggle section collapse
|
// Toggle section collapse
|
||||||
|
|||||||
Reference in New Issue
Block a user