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 (