mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-05-14 17:55:08 +00:00
fix: tick channel timeAgo labels every 1s instead of re-rendering every 30s
This commit is contained in:
+6
-2
@@ -487,7 +487,11 @@
|
||||
});
|
||||
|
||||
// Tick relative timestamps every 30s
|
||||
timeAgoTimer = setInterval(renderChannelList, 30000);
|
||||
timeAgoTimer = setInterval(function () {
|
||||
document.querySelectorAll('.ch-item-time[data-ts]').forEach(function (el) {
|
||||
el.textContent = timeAgo(el.dataset.ts);
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
var timeAgoTimer = null;
|
||||
@@ -548,7 +552,7 @@
|
||||
<div class="ch-item-body">
|
||||
<div class="ch-item-top">
|
||||
<span class="ch-item-name">${escapeHtml(name)}</span>
|
||||
<span class="ch-item-time">${time}</span>
|
||||
<span class="ch-item-time" data-ts="${ch.lastActivity || ''}">${time}</span>
|
||||
</div>
|
||||
<div class="ch-item-preview">${escapeHtml(preview)}</div>
|
||||
</div>
|
||||
|
||||
+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=1774131176" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="channels.js?v=1774131325" 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