Add global timezone/12h-24h setting and improve satellite selection

Global time preferences (Settings > Display > Time & Timezone):
- InterceptTime utility in core/utils.js with timezone + 12h/24h support
- Timezone options: UTC, Local, Eastern, Central, Mountain, Pacific
- Time format: 12-hour (AM/PM) or 24-hour toggle
- Defaults to US/Eastern + 12-hour
- Header nav clock updates to use selected timezone and format
- Weather satellite mode delegates to global InterceptTime
- Settings persist via localStorage, change listeners notify all modes

Weather satellite improvements:
- Satellite dropdown defaults to "All Meteor Satellites" showing all passes
- Can still filter to specific satellite (M2-3, M2-4, M2-4-80K)
- Capture button on pass cards auto-selects the correct satellite

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
mitchross
2026-03-25 01:24:42 -04:00
parent 554bd701c8
commit 72cd173291
6 changed files with 191 additions and 73 deletions
+19 -3
View File
@@ -77,8 +77,23 @@ function declineDisclaimer() {
function updateHeaderClock() {
const now = new Date();
const utc = now.toISOString().substring(11, 19);
document.getElementById('headerUtcTime').textContent = utc;
const el = document.getElementById('headerUtcTime');
const label = document.querySelector('.utc-label');
if (typeof InterceptTime !== 'undefined') {
if (el) el.textContent = InterceptTime.fullTime(now);
if (label) label.textContent = InterceptTime.getLabel() || 'LOCAL';
} else {
if (el) el.textContent = now.toISOString().substring(11, 19);
}
}
function initTimeSettings() {
const tzSelect = document.getElementById('globalTimezoneSelect');
const fmtSelect = document.getElementById('globalTimeFormatSelect');
if (typeof InterceptTime !== 'undefined') {
if (tzSelect) tzSelect.value = InterceptTime.getTimezone();
if (fmtSelect) fmtSelect.value = InterceptTime.getHour12() ? '12' : '24';
}
}
// ============== MODE SWITCHING ==============
@@ -447,7 +462,8 @@ function initApp() {
// Load theme
loadTheme();
// Start clock
// Start clock and init time settings
initTimeSettings();
updateHeaderClock();
setInterval(updateHeaderClock, 1000);