mirror of
https://github.com/smittix/intercept.git
synced 2026-07-22 00:08:10 -07:00
fix: stop satellite position polling when mode is inactive
Use postMessage from parent page to notify the satellite dashboard iframe of visibility changes, preventing unnecessary POST requests to /satellite/position when the user isn't viewing satellite mode. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4364,6 +4364,10 @@
|
||||
if (wifiLayoutContainer) wifiLayoutContainer.style.display = mode === 'wifi' ? 'flex' : 'none';
|
||||
if (btLayoutContainer) btLayoutContainer.style.display = mode === 'bluetooth' ? 'flex' : 'none';
|
||||
if (satelliteVisuals) satelliteVisuals.style.display = mode === 'satellite' ? 'block' : 'none';
|
||||
const satFrame = document.getElementById('satelliteDashboardFrame');
|
||||
if (satFrame && satFrame.contentWindow) {
|
||||
satFrame.contentWindow.postMessage({type: 'satellite-visibility', visible: mode === 'satellite'}, '*');
|
||||
}
|
||||
if (aprsVisuals) aprsVisuals.style.display = mode === 'aprs' ? 'flex' : 'none';
|
||||
if (tscmVisuals) tscmVisuals.style.display = mode === 'tscm' ? 'flex' : 'none';
|
||||
if (spyStationsVisuals) spyStationsVisuals.style.display = mode === 'spystations' ? 'flex' : 'none';
|
||||
|
||||
Reference in New Issue
Block a user