mirror of
https://github.com/smittix/intercept.git
synced 2026-07-20 23:38:10 -07:00
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:
@@ -84,7 +84,8 @@
|
||||
<div class="form-group">
|
||||
<label>Select Satellite</label>
|
||||
<select id="weatherSatSelect" class="mode-select">
|
||||
<option value="METEOR-M2-3" selected>Meteor-M2-3 (137.900 MHz LRPT)</option>
|
||||
<option value="" selected>All Meteor Satellites</option>
|
||||
<option value="METEOR-M2-3">Meteor-M2-3 (137.900 MHz LRPT)</option>
|
||||
<option value="METEOR-M2-4">Meteor-M2-4 (137.900 MHz LRPT)</option>
|
||||
<option value="METEOR-M2-4-80K">Meteor-M2-4 80k baud (fallback)</option>
|
||||
</select>
|
||||
|
||||
@@ -540,9 +540,14 @@
|
||||
window._navClockStarted = true;
|
||||
function updateNavUtcClock() {
|
||||
const now = new Date();
|
||||
const utc = now.toISOString().slice(11, 19);
|
||||
const el = document.getElementById('headerUtcTime');
|
||||
if (el) el.textContent = utc;
|
||||
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().slice(11, 19);
|
||||
}
|
||||
}
|
||||
setInterval(updateNavUtcClock, 1000);
|
||||
updateNavUtcClock();
|
||||
|
||||
@@ -216,6 +216,36 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-group">
|
||||
<div class="settings-group-title">Time & Timezone</div>
|
||||
|
||||
<div class="settings-row">
|
||||
<div class="settings-label">
|
||||
<span class="settings-label-text">Timezone</span>
|
||||
<span class="settings-label-desc">Applied across all modes</span>
|
||||
</div>
|
||||
<select id="globalTimezoneSelect" class="settings-select" onchange="InterceptTime.setTimezone(this.value)">
|
||||
<option value="UTC">UTC</option>
|
||||
<option value="local">Local (browser)</option>
|
||||
<option value="US/Eastern">Eastern (ET)</option>
|
||||
<option value="US/Central">Central (CT)</option>
|
||||
<option value="US/Mountain">Mountain (MT)</option>
|
||||
<option value="US/Pacific">Pacific (PT)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="settings-row">
|
||||
<div class="settings-label">
|
||||
<span class="settings-label-text">Time Format</span>
|
||||
<span class="settings-label-desc">12-hour (2:30 PM) or 24-hour (14:30)</span>
|
||||
</div>
|
||||
<select id="globalTimeFormatSelect" class="settings-select" onchange="InterceptTime.setHour12(this.value === '12')">
|
||||
<option value="12">12-hour (AM/PM)</option>
|
||||
<option value="24">24-hour</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Updates Section -->
|
||||
|
||||
Reference in New Issue
Block a user