mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-09-01 21:28:19 +00:00
fix: recent packets always sorted newest-first
Server was returning oldest-first despite .reverse() — sort client-side to guarantee descending time order on both detail page and side pane.
This commit is contained in:
+2
-2
@@ -95,7 +95,7 @@
|
||||
api('/nodes/' + encodeURIComponent(pubkey) + '/health', { ttl: CLIENT_TTL.nodeDetail }).catch(() => null)
|
||||
]);
|
||||
const n = nodeData.node;
|
||||
const adverts = nodeData.recentAdverts || [];
|
||||
const adverts = (nodeData.recentAdverts || []).sort((a, b) => new Date(b.timestamp) - new Date(a.timestamp));
|
||||
const title = document.querySelector('.node-full-title');
|
||||
if (title) title.textContent = n.name || pubkey.slice(0, 12);
|
||||
|
||||
@@ -499,7 +499,7 @@
|
||||
|
||||
function renderDetail(panel, data) {
|
||||
const n = data.node;
|
||||
const adverts = data.recentAdverts || [];
|
||||
const adverts = (data.recentAdverts || []).sort((a, b) => new Date(b.timestamp) - new Date(a.timestamp));
|
||||
const h = data.healthData || {};
|
||||
const stats = h.stats || {};
|
||||
const observers = h.observers || [];
|
||||
|
||||
Reference in New Issue
Block a user