mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-05-01 02:52:35 +02:00
fix(map): show correct "Last seen" for cached contacts
Used c.last_advert (numeric Unix timestamp) instead of c.last_seen (ISO 8601 string) which caused formatTimeAgo() to return "Invalid Date". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -218,7 +218,7 @@ function updateMapMarkers() {
|
||||
cachedFiltered.forEach(c => {
|
||||
const typeNum = TYPE_LABEL_TO_NUM[c.type_label] || 1;
|
||||
const color = CONTACT_TYPE_COLORS[typeNum] || '#2196F3';
|
||||
const lastSeen = c.last_seen ? formatTimeAgo(c.last_seen) : '';
|
||||
const lastSeen = c.last_advert ? formatTimeAgo(c.last_advert) : '';
|
||||
|
||||
L.circleMarker([c.adv_lat, c.adv_lon], {
|
||||
radius: 8,
|
||||
|
||||
Reference in New Issue
Block a user