mirror of
https://github.com/smittix/intercept.git
synced 2026-07-08 17:48:13 -07:00
fix(satellite): show 'NO UPCOMING PASSES' when all passes are in the past
updateCountdown fell back to passes[0] even when it was in the past, showing 00:00:00:00 with a stale satellite name indefinitely. Now displays a clear 'NO UPCOMING PASSES' state with '--' for all fields when no future pass exists in the current prediction window.
This commit is contained in:
@@ -2438,7 +2438,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!nextPass) nextPass = passes[0];
|
if (!nextPass) {
|
||||||
|
// All passes in the current window are in the past
|
||||||
|
document.getElementById('countdownSat').textContent = 'NO UPCOMING PASSES';
|
||||||
|
document.getElementById('countDays').textContent = '--';
|
||||||
|
document.getElementById('countHours').textContent = '--';
|
||||||
|
document.getElementById('countMins').textContent = '--';
|
||||||
|
document.getElementById('countSecs').textContent = '--';
|
||||||
|
['countDays', 'countHours', 'countMins', 'countSecs'].forEach(id => {
|
||||||
|
document.getElementById(id)?.classList.remove('active');
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
document.getElementById('countdownSat').textContent = nextPass.satellite;
|
document.getElementById('countdownSat').textContent = nextPass.satellite;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user