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
|
@ -112,11 +112,11 @@ app.whenReady().then(() => {
|
||||||
//serverProcess.unref(); // Allow the server process to continue running independently of the parent process
|
//serverProcess.unref(); // Allow the server process to continue running independently of the parent process
|
||||||
// break;
|
// break;
|
||||||
case "linux":
|
case "linux":
|
||||||
serverPath = join(basePath, "server.dist", "freedata-server");
|
serverPath = join(basePath, "server.dist", "freedata-server");
|
||||||
console.log(`Starting server with path: ${serverPath}`);
|
console.log(`Starting server with path: ${serverPath}`);
|
||||||
serverProcess = spawn(serverPath, [], { detached: true });
|
serverProcess = spawn(serverPath, [], { detached: true });
|
||||||
serverProcess.unref(); // Allow the server process to continue running independently of the parent process
|
serverProcess.unref(); // Allow the server process to continue running independently of the parent process
|
||||||
break;
|
break;
|
||||||
case "win32":
|
case "win32":
|
||||||
serverPath = join(basePath, "freedata-server", "freedata-server.exe");
|
serverPath = join(basePath, "freedata-server", "freedata-server.exe");
|
||||||
console.log(`Starting server with path: ${serverPath}`);
|
console.log(`Starting server with path: ${serverPath}`);
|
||||||
|
|
|
@ -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,12 +93,11 @@ const transmissionSpeedChartData = computed(() => ({
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}));
|
}));
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Line
|
<Line
|
||||||
:data="transmissionSpeedChartData"
|
:data="transmissionSpeedChartData"
|
||||||
:options="transmissionSpeedChartOptions"
|
:options="transmissionSpeedChartOptions"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { settingsStore as settings, onChange } from "../store/settingsStore.js";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<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">Enable message auto repeat</label>
|
||||||
<label class="input-group-text w-50">
|
<label class="input-group-text w-50">
|
||||||
<div class="form-check form-switch form-check-inline ms-2">
|
<div class="form-check form-switch form-check-inline ms-2">
|
||||||
|
|
|
@ -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