kopia lustrzana https://github.com/manuelkasper/sotlas-frontend
Display QRT/TEST type spots properly, and fix frequency formatting
rodzic
57e3ae8748
commit
4815bfee65
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<b-tag type="is-dark" :class="tagClass">{{ mode.toUpperCase() }}</b-tag>
|
||||
<b-tag v-if="!type || type === 'NORMAL'" type="is-dark" :class="tagClass">{{ mode.toUpperCase() }}</b-tag>
|
||||
<b-tag v-else type="is-dark" :class="tagClass">{{ type.toUpperCase() }}</b-tag>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -9,6 +10,10 @@ export default {
|
|||
mode: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
required: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
|
@ -36,10 +36,11 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
loadSolarData () {
|
||||
axios.get(process.env.VUE_APP_API_URL + '/solardata/latest')
|
||||
axios.get(process.env.VUE_APP_API_URL + '/solardata/latest', { ignoreError: true })
|
||||
.then(response => {
|
||||
this.latest = response.data
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="freqmode">{{ spot.frequency | formatFrequency }} <ModeLabel :mode="spot.mode" /></div>
|
||||
<div class="freqmode">{{ spot.frequency | formatFrequency }} <ModeLabel :mode="spot.mode" :type="spot.type" /></div>
|
||||
<div class="time" v-html="formatTimeDay(spot.timeStamp)" />
|
||||
<div class="callsign">
|
||||
<template v-if="callsignLink">
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
{{ props.row.frequency | formatFrequency }}
|
||||
</b-table-column>
|
||||
<b-table-column field="mode" label="Mode" sortable>
|
||||
<ModeLabel :mode="props.row.mode" />
|
||||
<ModeLabel :mode="props.row.mode" :type="props.row.type" />
|
||||
</b-table-column>
|
||||
<b-table-column v-if="showSummitInfo" field="summit.code" label="Summit Ref." class="nowrap" sortable>
|
||||
<CountryFlag v-if="props.row.summit.isoCode && $mq.fullhd" :country="props.row.summit.isoCode" class="flag" />
|
||||
|
|
|
@ -68,10 +68,13 @@ export default {
|
|||
return frequency
|
||||
}
|
||||
frequency = String(frequency)
|
||||
let matches = frequency.match(/^(\d+)\.(\d+)$/)
|
||||
let matches = frequency.match(/^(\d+)(?:\.(\d+))?$/)
|
||||
if (matches) {
|
||||
let mhz = matches[1]
|
||||
let khz = matches[2]
|
||||
if (!khz) {
|
||||
khz = '0'
|
||||
}
|
||||
while (khz.length < 3) {
|
||||
khz += '0'
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue