[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

@ -112,11 +112,11 @@ app.whenReady().then(() => {
//serverProcess.unref(); // Allow the server process to continue running independently of the parent process
// break;
case "linux":
serverPath = join(basePath, "server.dist", "freedata-server");
console.log(`Starting server with path: ${serverPath}`);
serverProcess = spawn(serverPath, [], { detached: true });
serverProcess.unref(); // Allow the server process to continue running independently of the parent process
break;
serverPath = join(basePath, "server.dist", "freedata-server");
console.log(`Starting server with path: ${serverPath}`);
serverProcess = spawn(serverPath, [], { detached: true });
serverProcess.unref(); // Allow the server process to continue running independently of the parent process
break;
case "win32":
serverPath = join(basePath, "freedata-server", "freedata-server.exe");
console.log(`Starting server with path: ${serverPath}`);

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,12 +93,11 @@ const transmissionSpeedChartData = computed(() => ({
},
],
}));
</script>
<template>
<Line
:data="transmissionSpeedChartData"
:options="transmissionSpeedChartOptions"
/>
<Line
:data="transmissionSpeedChartData"
:options="transmissionSpeedChartOptions"
/>
</template>

View file

@ -9,7 +9,7 @@ import { settingsStore as settings, onChange } from "../store/settingsStore.js";
</script>
<template>
<div class="input-group input-group-sm mb-1">
<div class="input-group input-group-sm mb-1">
<label class="input-group-text w-50">Enable message auto repeat</label>
<label class="input-group-text w-50">
<div class="form-check form-switch form-check-inline ms-2">

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;
}