mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-05-25 19:14:05 +00:00
fix: tick channel list relative timestamps every 30s
timeAgo labels were computed once on render and never updated, showing stale '11h ago' until next WS message triggered re-render. Added 30s interval to re-render channel list, cleaned up on destroy.
This commit is contained in:
@@ -485,11 +485,18 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Tick relative timestamps every 30s
|
||||
timeAgoTimer = setInterval(renderChannelList, 30000);
|
||||
}
|
||||
|
||||
var timeAgoTimer = null;
|
||||
|
||||
function destroy() {
|
||||
if (wsHandler) offWS(wsHandler);
|
||||
wsHandler = null;
|
||||
if (timeAgoTimer) clearInterval(timeAgoTimer);
|
||||
timeAgoTimer = null;
|
||||
if (regionChangeHandler) RegionFilter.offChange(regionChangeHandler);
|
||||
regionChangeHandler = null;
|
||||
channels = [];
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@
|
||||
<script src="home.js?v=1774042199"></script>
|
||||
<script src="packets.js?v=1774127844"></script>
|
||||
<script src="map.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="channels.js?v=1774129112" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="channels.js?v=1774129290" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="nodes.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="traces.js?v=1774350000" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="analytics.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
|
||||
Reference in New Issue
Block a user