mirror of
https://github.com/l5yth/potato-mesh.git
synced 2026-08-08 09:52:44 +02:00
Display position time in relative 'time ago' format (#19)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user