diff --git a/www/js/version.json b/www/js/version.json index 299d46e..e3e671e 100644 --- a/www/js/version.json +++ b/www/js/version.json @@ -1,5 +1,5 @@ { - "VERSION": "v0.7.40", - "VERSION_NUMBER": "0.7.40", - "BUILD_DATE": "2026-06-26T13:38:31.838Z" + "VERSION": "v0.7.41", + "VERSION_NUMBER": "0.7.41", + "BUILD_DATE": "2026-06-26T13:43:02.547Z" } diff --git a/www/relays.html b/www/relays.html index 09bab34..d7c7741 100644 --- a/www/relays.html +++ b/www/relays.html @@ -419,25 +419,24 @@ const versionInfo = await getVersion(); if (hamburgerInstance) { hamburgerInstance.animateTo('arrow_left'); } + const historyEnabled = localStorage.getItem('relayConnectionHistory') === 'true'; + connectionHistoryEnabled = historyEnabled; divSideNavBody.innerHTML = ` -
-
Relays
- +
+ Show connection history +
${historyEnabled ? SVG_CHECKED : SVG_UNCHECKED}
`; // Wire up the connection history toggle - const chkShowConnectionHistory = document.getElementById('chkShowConnectionHistory'); - if (chkShowConnectionHistory) { - chkShowConnectionHistory.checked = localStorage.getItem('relayConnectionHistory') === 'true'; - chkShowConnectionHistory.addEventListener('change', () => { - const checked = chkShowConnectionHistory.checked; + const divHistoryToggle = document.getElementById('divHistoryToggleCheckbox'); + if (divHistoryToggle) { + const toggleHistory = () => { + const checked = !connectionHistoryEnabled; connectionHistoryEnabled = checked; localStorage.setItem('relayConnectionHistory', checked); setRelayEventLogging(checked); + divHistoryToggle.innerHTML = checked ? SVG_CHECKED : SVG_UNCHECKED; const wrap = document.getElementById('divRelayEventsWrap'); if (wrap) { wrap.style.display = checked ? '' : 'none'; @@ -452,7 +451,12 @@ const versionInfo = await getVersion(); divRelayEvents.innerHTML = ''; } } + }; + divHistoryToggle.addEventListener('click', (e) => { + e.stopPropagation(); + toggleHistory(); }); + document.getElementById('divRelaySettings').addEventListener('click', toggleHistory); } // Initialize version bar buttons when sidenav opens (lazy load)