Show isolocal and tzname properties on the popup

Closes #108.
This commit is contained in:
Linus Groh
2024-02-26 23:08:39 +00:00
parent 7398da74c5
commit 06faa73b70
3 changed files with 23 additions and 2 deletions

View File

@@ -13,6 +13,12 @@
<li :title="$t('Timestamp')">
<ClockIcon size="1x" aria-hidden="true" role="img" />
{{ new Date(timestamp * 1000).toLocaleString($config.locale) }}
<span v-if="isoLocal && timeZone">
<br />
<code style="font-size: 0.7rem">
{{ isoLocal }}[{{ timeZone }}]
</code>
</span>
</li>
<li :title="$t('Location')">
<MapPinIcon size="1x" aria-hidden="true" role="img" />
@@ -59,7 +65,6 @@
.wrapper {
display: flex;
margin-top: 10px;
margin-right: 20px;
img {
align-self: start;
@@ -116,6 +121,14 @@ export default {
type: Number,
default: 0,
},
isoLocal: {
type: String,
default: "",
},
timeZone: {
type: String,
default: "",
},
lat: {
type: Number,
default: 0,

4
src/index.d.ts vendored
View File

@@ -163,6 +163,10 @@ interface OTLocation {
isorcv?: string;
/** ISO 8601 timestamp */
isotst?: string;
/** ISO 8601 timestamp in local time */
isolocal?: string;
/** tzdb time zone name */
tzname?: string;
/** Latitude in degrees */
lat: number;
/** Longitude in degrees */

View File

@@ -46,6 +46,8 @@
:name="l.name"
:face="l.face"
:timestamp="l.tst"
:iso-local="l.isolocal"
:time-zone="l.tzname"
:lat="l.lat"
:lon="l.lon"
:alt="l.alt"
@@ -53,7 +55,7 @@
:speed="l.vel"
:regions="l.inregions"
:wifi="{ ssid: l.SSID, bssid: l.BSSID }"
:options="{ className: 'leaflet-popup--for-pin' }"
:options="{ className: 'leaflet-popup--for-pin', maxWidth: 400 }"
:address="l.addr"
/>
</LMarker>
@@ -87,6 +89,8 @@
:name="l.name"
:face="l.face"
:timestamp="l.tst"
:iso-local="l.isolocal"
:time-zone="l.tzname"
:lat="l.lat"
:lon="l.lon"
:alt="l.alt"