Display position time in relative 'time ago' format (#19)

This commit is contained in:
l5y
2025-09-13 16:49:40 +02:00
committed by GitHub
parent 1dbd677f96
commit cdfc4c9610
+2 -2
View File
@@ -173,7 +173,7 @@
<td>${timeAgo(n.last_heard)}</td>
<td>${fmt(n.latitude)}</td>
<td>${fmt(n.longitude)}</td>
<td class="mono">${n.pos_time_iso || ""}</td>`;
<td class="mono">${n.pos_time_iso ? `${n.pos_time_iso} (${timeAgo(n.position_time)})` : ""}</td>`;
tb.appendChild(tr);
}
}
@@ -202,7 +202,7 @@
(n.snr != null ? `SNR: ${n.snr}` : null),
(n.battery_level != null ? `Battery: ${n.battery_level}` : null),
(n.last_heard ? `Last seen: ${timeAgo(n.last_heard)}` : null),
(n.pos_time_iso ? `Pos time: ${n.pos_time_iso}` : null)
(n.pos_time_iso ? `Pos time: ${n.pos_time_iso} (${timeAgo(n.position_time)})` : null)
].filter(Boolean);
marker.bindPopup(lines.join('<br/>'));
marker.addTo(markersLayer);