mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
[CodeFactor] Apply fixes to commit c8e2ae4
This commit is contained in:
parent
c8e2ae482b
commit
d796b670f7
6 changed files with 37 additions and 35 deletions
|
@ -34,9 +34,10 @@ function getMaidenheadDistance(dxGrid) {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function pushToPing(origin)
|
function pushToPing(origin) {
|
||||||
{
|
window.dispatchEvent(
|
||||||
window.dispatchEvent(new CustomEvent("stationSelected", {bubbles:true, detail: origin }));
|
new CustomEvent("stationSelected", { bubbles: true, detail: origin }),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
@ -58,7 +59,11 @@ function pushToPing(origin)
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="miniHeardStations">
|
<tbody id="miniHeardStations">
|
||||||
<!--https://vuejs.org/guide/essentials/list.html-->
|
<!--https://vuejs.org/guide/essentials/list.html-->
|
||||||
<tr v-for="item in state.heard_stations" :key="item.origin" @click="pushToPing(item.origin)">
|
<tr
|
||||||
|
v-for="item in state.heard_stations"
|
||||||
|
:key="item.origin"
|
||||||
|
@click="pushToPing(item.origin)"
|
||||||
|
>
|
||||||
<td>
|
<td>
|
||||||
<span class="fs-6">{{ getDateTime(item.timestamp) }}</span>
|
<span class="fs-6">{{ getDateTime(item.timestamp) }}</span>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -1,26 +1,27 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { setActivePinia } from "pinia";
|
import { setActivePinia } from "pinia";
|
||||||
import pinia from "../../store/index";
|
import pinia from "../../store/index";
|
||||||
import { setRadioParametersFrequency, setRadioParametersMode, setRadioParametersRFLevel } from "../../js/api";
|
import {
|
||||||
|
setRadioParametersFrequency,
|
||||||
|
setRadioParametersMode,
|
||||||
|
setRadioParametersRFLevel,
|
||||||
|
} from "../../js/api";
|
||||||
setActivePinia(pinia);
|
setActivePinia(pinia);
|
||||||
|
|
||||||
import { useStateStore } from "../../store/stateStore.js";
|
import { useStateStore } from "../../store/stateStore.js";
|
||||||
const state = useStateStore(pinia);
|
const state = useStateStore(pinia);
|
||||||
|
|
||||||
function set_radio_parameter_frequency(){
|
function set_radio_parameter_frequency() {
|
||||||
setRadioParametersFrequency(state.new_frequency)
|
setRadioParametersFrequency(state.new_frequency);
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_radio_parameter_mode(){
|
function set_radio_parameter_mode() {
|
||||||
setRadioParametersMode(state.mode)
|
setRadioParametersMode(state.mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_radio_parameter_rflevel(){
|
function set_radio_parameter_rflevel() {
|
||||||
setRadioParametersRFLevel(state.rf_level)
|
setRadioParametersRFLevel(state.rf_level);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -21,7 +21,6 @@ import {
|
||||||
} from "chart.js";
|
} from "chart.js";
|
||||||
import { Line, Scatter } from "vue-chartjs";
|
import { Line, Scatter } from "vue-chartjs";
|
||||||
|
|
||||||
|
|
||||||
ChartJS.register(
|
ChartJS.register(
|
||||||
CategoryScale,
|
CategoryScale,
|
||||||
LinearScale,
|
LinearScale,
|
||||||
|
@ -94,7 +93,6 @@ const transmissionSpeedChartData = computed(() => ({
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}));
|
}));
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -8,13 +8,11 @@ import { settingsStore as settings, onChange } from "../store/settingsStore.js";
|
||||||
import { useStateStore } from "../store/stateStore";
|
import { useStateStore } from "../store/stateStore";
|
||||||
const stateStore = useStateStore(pinia);
|
const stateStore = useStateStore(pinia);
|
||||||
|
|
||||||
import {
|
import { getRadioStatus } from "./api";
|
||||||
getRadioStatus,
|
|
||||||
} from "./api";
|
|
||||||
|
|
||||||
export async function processRadioStatus(){
|
export async function processRadioStatus() {
|
||||||
let result = await getRadioStatus()
|
let result = await getRadioStatus();
|
||||||
stateStore.mode = result.radio_mode
|
stateStore.mode = result.radio_mode;
|
||||||
stateStore.frequency = result.radio_frequency
|
stateStore.frequency = result.radio_frequency;
|
||||||
stateStore.rf_level = result.radio_rf_level
|
stateStore.rf_level = result.radio_rf_level;
|
||||||
}
|
}
|
Loading…
Reference in a new issue