Grid widget tweaks

This commit is contained in:
Mashintime 2023-12-05 22:09:52 -05:00
parent d752314a67
commit c2d09902d7
3 changed files with 23 additions and 32 deletions

View file

@ -16,7 +16,7 @@ function getDateTime(timestampRaw) {
navigator.language, navigator.language,
{ {
hourCycle: "h23", hourCycle: "h23",
year: "numeric", year: "2-digit",
month: "2-digit", month: "2-digit",
day: "2-digit", day: "2-digit",
hour: "2-digit", hour: "2-digit",
@ -46,7 +46,7 @@ function getMaidenheadDistance(dxGrid) {
<div class="card-body overflow-auto"> <div class="card-body overflow-auto">
<div class="table-responsive"> <div class="table-responsive">
<!-- START OF TABLE FOR HEARD STATIONS --> <!-- START OF TABLE FOR HEARD STATIONS -->
<table class="table table-sm" id="tblHeardStationList"> <table class="table table-sm table-striped" id="tblHeardStationList">
<thead> <thead>
<tr> <tr>
<th scope="col" id="thTime">Time</th> <th scope="col" id="thTime">Time</th>
@ -61,35 +61,31 @@ function getMaidenheadDistance(dxGrid) {
</thead> </thead>
<tbody id="gridHeardStations"> <tbody id="gridHeardStations">
<!--https://vuejs.org/guide/essentials/list.html--> <!--https://vuejs.org/guide/essentials/list.html-->
<tr v-for="item in state.activities" :key="item[0]"> <tr v-for="item in state.heard_stations" :key="item.origin">
<td> <td>
<span class="badge bg-secondary">{{ {{
getDateTime(item[1].timestamp) getDateTime(item.timestamp)
}}</span> }}
</td> </td>
<td> <td>
<span class="badge bg-secondary" {{ item.frequency / 1000 }} kHz
>{{ item[1].frequency / 1000 }} kHz</span
>
</td> </td>
<td> <td>
<span class="badge bg-secondary">{{ item[1].origin }}</span> {{ item.origin }}
</td> </td>
<td> <td>
<span class="badge bg-secondary">{{ item[1].gridsquare }}</span> {{ item.gridsquare }}
</td> </td>
<td> <td>
<span class="badge bg-secondary" {{ getMaidenheadDistance(item.gridsquare) }} km
>{{ getMaidenheadDistance(item[1].gridsquare) }} km</span
>
</td> </td>
<td> <td>
<span class="badge bg-secondary">{{ {{
item[1].activity_type item.activity_type
}}</span> }}
</td> </td>
<td> <td>
<span class="badge bg-secondary">{{ item[1].snr }}</span> {{ item.snr }}
</td> </td>
</tr> </tr>
</tbody> </tbody>

View file

@ -46,14 +46,12 @@ function getMaidenheadDistance(dxGrid) {
<div class="card-body overflow-auto"> <div class="card-body overflow-auto">
<div class="table-responsive"> <div class="table-responsive">
<!-- START OF TABLE FOR HEARD STATIONS --> <!-- START OF TABLE FOR HEARD STATIONS -->
<table class="table table-sm" id="tblHeardStationList"> <table class="table table-sm table-striped" id="tblHeardStationList">
<thead> <thead>
<tr> <tr>
<th scope="col" id="thTime">Time</th> <th scope="col" id="thTime">Time</th>
<th scope="col" id="thDxcall">DXCall</th> <th scope="col" id="thDxcall">DXCall</th>
<th scope="col" id="thSnr">SNR</th>
<!--<th scope="col">Off</th>-->
</tr> </tr>
</thead> </thead>
<tbody id="miniHeardStations"> <tbody id="miniHeardStations">
@ -66,9 +64,6 @@ function getMaidenheadDistance(dxGrid) {
<td> <td>
<span>{{ item.origin }}</span> <span>{{ item.origin }}</span>
</td> </td>
<td>
<span>{{ item.snr }}</span>
</td>
<!--<td>{{ item.offset }}</td>--> <!--<td>{{ item.offset }}</td>-->
</tr> </tr>
</tbody> </tbody>

View file

@ -81,35 +81,35 @@ function getMaidenheadDistance(dxGrid) {
</thead> </thead>
<tbody id="heardstations"> <tbody id="heardstations">
<!--https://vuejs.org/guide/essentials/list.html--> <!--https://vuejs.org/guide/essentials/list.html-->
<tr v-for="item in state.activities" :key="item[0]"> <tr v-for="item in state.heard_stations" :key="item.origin">
<td> <td>
<span class="badge bg-secondary">{{ <span class="badge bg-secondary">{{
getDateTime(item[1].timestamp) getDateTime(item.timestamp)
}}</span> }}</span>
</td> </td>
<td> <td>
<span class="badge bg-secondary" <span class="badge bg-secondary"
>{{ item[1].frequency / 1000 }} kHz</span >{{ item.frequency / 1000 }} kHz</span
> >
</td> </td>
<td> <td>
<span class="badge bg-secondary">{{ item[1].origin }}</span> <span class="badge bg-secondary">{{ item.origin }}</span>
</td> </td>
<td> <td>
<span class="badge bg-secondary">{{ item[1].gridsquare }}</span> <span class="badge bg-secondary">{{ item.gridsquare }}</span>
</td> </td>
<td> <td>
<span class="badge bg-secondary" <span class="badge bg-secondary"
>{{ getMaidenheadDistance(item[1].gridsquare) }} km</span >{{ getMaidenheadDistance(item.gridsquare) }} km</span
> >
</td> </td>
<td> <td>
<span class="badge bg-secondary">{{ <span class="badge bg-secondary">{{
item[1].activity_type item.activity_type
}}</span> }}</span>
</td> </td>
<td> <td>
<span class="badge bg-secondary">{{ item[1].snr }}</span> <span class="badge bg-secondary">{{ item.snr }}</span>
</td> </td>
<!--<td>{{ item.offset }}</td>--> <!--<td>{{ item.offset }}</td>-->
</tr> </tr>