show inserted/updated instead of last adverted

This commit is contained in:
recrof 2025-07-18 17:11:15 +02:00
parent 886e8d3c6d
commit 21103bf4fa

View file

@ -1,11 +1,12 @@
import { createApp, reactive, ref, computed, onMounted } from '../lib/vue.esm-browser.js'; import { createApp, reactive, ref, computed, onMounted } from '../lib/vue.esm-browser.js';
const apiUrl = 'https://map.meshcore.dev/api/v1/nodes'; const apiUrl = 'https://map.meshcore.dev/api/v1/nodes';
const keyOrder = ['adv_name', 'type', 'link', 'last_advert', 'public_key', 'coords', 'params' ] const keyOrder = ['adv_name', 'type', 'link', 'inserted_date', 'updated_date', 'public_key', 'coords', 'params' ]
const humanLabel = { const humanLabel = {
coords: 'Coordinates', coords: 'Coordinates',
adv_name: 'Name', adv_name: 'Name',
last_advert: 'Last heard', inserted_date: 'Inserted',
updated_date: 'Last updated',
public_key: 'Public key', public_key: 'Public key',
type: 'Node type', type: 'Node type',
params: 'Radio params', params: 'Radio params',
@ -20,7 +21,10 @@ const types = {
}; };
const humanValue = { const humanValue = {
last_advert(val) { inserted_date(val) {
return new Date(val).toLocaleString();
},
updated_date(val) {
return new Date(val).toLocaleString(); return new Date(val).toLocaleString();
}, },
coords(val) { coords(val) {