fix: show real capture date in map popup (timestamp field + invalid-date guard)
map.js read capture.captured_at, but the backend stores the field as `timestamp`, so every marker popup rendered "Invalid Date". Fall back to timestamp and guard against unparseable values. Regenerated README popup screenshot to reflect the fix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 3.6 MiB After Width: | Height: | Size: 3.6 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.8 MiB After Width: | Height: | Size: 3.8 MiB |
+3
-1
@@ -182,7 +182,9 @@ function createMarker(capture) {
|
||||
|
||||
function createPopupContent(capture) {
|
||||
const freqMHz = (capture.frequency / 1e6).toFixed(2);
|
||||
const date = new Date(capture.captured_at).toLocaleDateString();
|
||||
const ts = capture.timestamp || capture.captured_at;
|
||||
const parsed = ts ? new Date(ts) : null;
|
||||
const date = parsed && !isNaN(parsed) ? parsed.toLocaleDateString() : 'Unknown';
|
||||
|
||||
let deviceInfo = 'Unknown Device';
|
||||
if (capture.device_name) {
|
||||
|
||||
Reference in New Issue
Block a user