diff --git a/public/index.html b/public/index.html index 06bf916..7670964 100644 --- a/public/index.html +++ b/public/index.html @@ -1178,12 +1178,27 @@ // PROPAGATION PANEL COMPONENT (Toggleable views) // ============================================ const PropagationPanel = ({ propagation, loading }) => { - const [viewMode, setViewMode] = useState('bars'); // 'bars' or 'chart' + // Load view mode preference from localStorage, default to 'chart' + const [viewMode, setViewMode] = useState(() => { + try { + const saved = localStorage.getItem('openhamclock_voacapViewMode'); + return saved === 'bars' ? 'bars' : 'chart'; // Default to chart + } catch (e) { return 'chart'; } + }); + + // Save view mode preference when changed + const toggleViewMode = () => { + const newMode = viewMode === 'bars' ? 'chart' : 'bars'; + setViewMode(newMode); + try { + localStorage.setItem('openhamclock_voacapViewMode', newMode); + } catch (e) { console.error('Failed to save VOACAP view mode:', e); } + }; if (loading || !propagation) { return (
-
📡 HF Propagation
+
📡 VOACAP
Loading predictions...
@@ -1229,9 +1244,9 @@ const bands = ['80m', '40m', '30m', '20m', '17m', '15m', '12m', '10m']; return ( -
setViewMode(v => v === 'bars' ? 'chart' : 'bars')}> +
- 📡 HF Propagation {hasRealData && } + 📡 VOACAP {hasRealData && } {viewMode === 'bars' ? '▦ bars' : '▤ chart'} • click to toggle