[CodeFactor] Apply fixes to commit c8e2ae4

This commit is contained in:
codefactor-io 2024-04-17 20:50:03 +00:00
parent c8e2ae482b
commit d796b670f7
No known key found for this signature in database
GPG key ID: B66B2D63282C190F
6 changed files with 37 additions and 35 deletions

View file

@ -34,9 +34,10 @@ function getMaidenheadDistance(dxGrid) {
//
}
}
function pushToPing(origin)
{
window.dispatchEvent(new CustomEvent("stationSelected", {bubbles:true, detail: origin }));
function pushToPing(origin) {
window.dispatchEvent(
new CustomEvent("stationSelected", { bubbles: true, detail: origin }),
);
}
</script>
<template>
@ -58,7 +59,11 @@ function pushToPing(origin)
</thead>
<tbody id="miniHeardStations">
<!--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>
<span class="fs-6">{{ getDateTime(item.timestamp) }}</span>
</td>

View file

@ -1,26 +1,27 @@
<script setup lang="ts">
import { setActivePinia } from "pinia";
import pinia from "../../store/index";
import { setRadioParametersFrequency, setRadioParametersMode, setRadioParametersRFLevel } from "../../js/api";
import {
setRadioParametersFrequency,
setRadioParametersMode,
setRadioParametersRFLevel,
} from "../../js/api";
setActivePinia(pinia);
import { useStateStore } from "../../store/stateStore.js";
const state = useStateStore(pinia);
function set_radio_parameter_frequency(){
setRadioParametersFrequency(state.new_frequency)
function set_radio_parameter_frequency() {
setRadioParametersFrequency(state.new_frequency);
}
function set_radio_parameter_mode(){
setRadioParametersMode(state.mode)
function set_radio_parameter_mode() {
setRadioParametersMode(state.mode);
}
function set_radio_parameter_rflevel(){
setRadioParametersRFLevel(state.rf_level)
function set_radio_parameter_rflevel() {
setRadioParametersRFLevel(state.rf_level);
}
</script>
<template>

View file

@ -21,7 +21,6 @@ import {
} from "chart.js";
import { Line, Scatter } from "vue-chartjs";
ChartJS.register(
CategoryScale,
LinearScale,
@ -94,7 +93,6 @@ const transmissionSpeedChartData = computed(() => ({
},
],
}));
</script>
<template>

View file

@ -8,13 +8,11 @@ import { settingsStore as settings, onChange } from "../store/settingsStore.js";
import { useStateStore } from "../store/stateStore";
const stateStore = useStateStore(pinia);
import {
getRadioStatus,
} from "./api";
import { getRadioStatus } from "./api";
export async function processRadioStatus(){
let result = await getRadioStatus()
stateStore.mode = result.radio_mode
stateStore.frequency = result.radio_frequency
stateStore.rf_level = result.radio_rf_level
export async function processRadioStatus() {
let result = await getRadioStatus();
stateStore.mode = result.radio_mode;
stateStore.frequency = result.radio_frequency;
stateStore.rf_level = result.radio_rf_level;
}