mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
fixing some typescript errors
This commit is contained in:
parent
7ee4f6b61f
commit
2ccf41f674
5 changed files with 25 additions and 41 deletions
|
@ -59,14 +59,14 @@ function saveSettings() {
|
|||
maxlength="8"
|
||||
aria-label="Input group"
|
||||
aria-describedby="btnGroupAddon"
|
||||
v-model="settings.mycall"
|
||||
v-model="settings.remote.STATION.mycall"
|
||||
@input="saveSettings"
|
||||
/>
|
||||
<select
|
||||
class="form-select form-select-sm"
|
||||
aria-label=".form-select-sm"
|
||||
id="myCallSSID"
|
||||
v-model="settings.myssid"
|
||||
v-model="settings.remote.STATION.myssid"
|
||||
@change="saveSettings"
|
||||
>
|
||||
<option selected value="0">0</option>
|
||||
|
@ -109,7 +109,7 @@ function saveSettings() {
|
|||
maxlength="6"
|
||||
aria-label="Input group"
|
||||
aria-describedby="btnGroupAddon"
|
||||
v-model="settings.mygrid"
|
||||
v-model="settings.remote.STATION.mygrid"
|
||||
@input="saveSettings"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -16,7 +16,7 @@ function startStopRigctld() {
|
|||
switch (state.rigctld_started) {
|
||||
case "stopped":
|
||||
|
||||
settings.hamlib_deviceport = (<HTMLInputElement>document.getElementById("hamlib_deviceport")).value;
|
||||
settings.remote.RADIO.serial_port = (<HTMLInputElement>document.getElementById("hamlib_deviceport")).value;
|
||||
|
||||
startRigctld();
|
||||
|
||||
|
@ -34,17 +34,17 @@ function selectRadioControl() {
|
|||
// @ts-expect-error
|
||||
switch (event.target.id) {
|
||||
case "list-rig-control-none-list":
|
||||
settings.radiocontrol = "disabled";
|
||||
settings.remote.RADIO.control = "disabled";
|
||||
break;
|
||||
case "list-rig-control-rigctld-list":
|
||||
settings.radiocontrol = "rigctld";
|
||||
settings.remote.RADIO.control = "rigctld";
|
||||
break;
|
||||
case "list-rig-control-tci-list":
|
||||
settings.radiocontrol = "tci";
|
||||
settings.remote.RADIO.control = "tci";
|
||||
break;
|
||||
default:
|
||||
console.log("default=!==");
|
||||
settings.radiocontrol = "disabled";
|
||||
settings.remote.RADIO.control = "disabled";
|
||||
}
|
||||
saveSettingsToFile();
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ alert("not yet implemented")
|
|||
href="#list-rig-control-none"
|
||||
role="tab"
|
||||
aria-controls="list-rig-control-none"
|
||||
v-bind:class="{ active: settings.radiocontrol === 'disabled' }"
|
||||
v-bind:class="{ active: settings.remote.RADIO.control === 'disabled' }"
|
||||
@click="selectRadioControl()"
|
||||
>None</a
|
||||
>
|
||||
|
@ -95,7 +95,7 @@ alert("not yet implemented")
|
|||
href="#list-rig-control-rigctld"
|
||||
role="tab"
|
||||
aria-controls="list-rig-control-rigctld"
|
||||
v-bind:class="{ active: settings.radiocontrol === 'rigctld' }"
|
||||
v-bind:class="{ active: settings.remote.RADIO.control === 'rigctld' }"
|
||||
@click="selectRadioControl()"
|
||||
>Rigctld</a
|
||||
>
|
||||
|
@ -106,7 +106,7 @@ alert("not yet implemented")
|
|||
href="#list-rig-control-tci"
|
||||
role="tab"
|
||||
aria-controls="list-rig-control-tci"
|
||||
v-bind:class="{ active: settings.radiocontrol === 'tci' }"
|
||||
v-bind:class="{ active: settings.remote.RADIO.control === 'tci' }"
|
||||
@click="selectRadioControl()"
|
||||
>TCI</a
|
||||
>
|
||||
|
@ -131,7 +131,7 @@ alert("not yet implemented")
|
|||
<div class="tab-content" id="rig-control-nav-tabContent">
|
||||
<div
|
||||
class="tab-pane fade"
|
||||
v-bind:class="{ 'show active': settings.radiocontrol === 'disabled' }"
|
||||
v-bind:class="{ 'show active': settings.remote.RADIO.control === 'disabled' }"
|
||||
id="list-rig-control-none"
|
||||
role="tabpanel"
|
||||
aria-labelledby="list-rig-control-none-list"
|
||||
|
@ -145,7 +145,7 @@ alert("not yet implemented")
|
|||
<div
|
||||
class="tab-pane fade"
|
||||
id="list-rig-control-rigctld"
|
||||
v-bind:class="{ 'show active': settings.radiocontrol === 'rigctld' }"
|
||||
v-bind:class="{ 'show active': settings.remote.RADIO.control === 'rigctld' }"
|
||||
role="tabpanel"
|
||||
aria-labelledby="list-rig-control-rigctld-list"
|
||||
>
|
||||
|
@ -200,7 +200,7 @@ alert("not yet implemented")
|
|||
<div
|
||||
class="tab-pane fade"
|
||||
id="list-rig-control-tci"
|
||||
v-bind:class="{ 'show active': settings.radiocontrol === 'tci' }"
|
||||
v-bind:class="{ 'show active': settings.remote.RADIO.control === 'tci' }"
|
||||
role="tabpanel"
|
||||
aria-labelledby="list-rig-control-tci-list"
|
||||
>
|
||||
|
@ -214,7 +214,7 @@ alert("not yet implemented")
|
|||
placeholder="tci IP"
|
||||
id="tci_ip"
|
||||
aria-label="Device IP"
|
||||
v-model="settings.tci_ip"
|
||||
v-model="settings.remote.TCI.tci_ip"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
@ -226,7 +226,7 @@ alert("not yet implemented")
|
|||
placeholder="tci port"
|
||||
id="tci_port"
|
||||
aria-label="Device Port"
|
||||
v-model="settings.tci_port"
|
||||
v-model="settings.remote.TCI.tci_port"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -176,20 +176,7 @@ import { audioInputOptions, audioOutputOptions } from "../js/deviceFormHelper";
|
|||
<option value="3600">60 mins</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group input-group-sm mb-1">
|
||||
<label class="input-group-text w-50">Enable waterfall data</label>
|
||||
<label class="input-group-text w-50">
|
||||
<div class="form-check form-switch form-check-inline">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
id="fftSwitch"
|
||||
v-model="settings.local.enable_fft"
|
||||
/>
|
||||
<label class="form-check-label" for="fftSwitch">Waterfall</label>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="input-group input-group-sm mb-1">
|
||||
<label class="input-group-text w-50">Enable 250Hz bandwidth mode</label>
|
||||
<label class="input-group-text w-50">
|
||||
|
|
|
@ -896,7 +896,7 @@ export function newMessageReceived(message, protocol) {
|
|||
uuid: message[3],
|
||||
duration: 0,
|
||||
nacks: 0,
|
||||
speed_list: [],
|
||||
speed_list: "[]",
|
||||
_attachments: {
|
||||
[message[6]]: {
|
||||
content_type: message[7],
|
||||
|
|
|
@ -8,9 +8,6 @@ setActivePinia(pinia);
|
|||
|
||||
import { settingsStore as settings, onChange } from "../store/settingsStore.js";
|
||||
|
||||
import { useAudioStore } from "../store/audioStore.js";
|
||||
const audioStore = useAudioStore(pinia);
|
||||
|
||||
import { useStateStore } from "../store/stateStore";
|
||||
const stateStore = useStateStore(pinia);
|
||||
|
||||
|
@ -89,11 +86,11 @@ export function loadSettings() {
|
|||
}
|
||||
try {
|
||||
if (key == "wftheme") {
|
||||
setColormap(config[key]);
|
||||
setColormap();
|
||||
}
|
||||
if (key == "mycall") {
|
||||
settings.mycall = config[key].split("-")[0];
|
||||
settings.myssid = config[key].split("-")[1];
|
||||
settings.remote.STATION.mycall = config[key].split("-")[0];
|
||||
settings.remote.STATION.myssid = config[key].split("-")[1];
|
||||
} else {
|
||||
settings[key] = config[key];
|
||||
}
|
||||
|
@ -127,11 +124,11 @@ export function processModemConfig(data) {
|
|||
let mycall = data[category][setting];
|
||||
if (mycall.includes("-")) {
|
||||
const splittedCallsign = mycall.split("-");
|
||||
settings.mycall = splittedCallsign[0]; // The part before the hyphen
|
||||
settings.myssid = parseInt(splittedCallsign[1], 10); // The part after the hyphen, converted to a number
|
||||
settings.remote.STATION.mycall = splittedCallsign[0]; // The part before the hyphen
|
||||
settings.remote.STATION.myssid = parseInt(splittedCallsign[1], 10); // The part after the hyphen, converted to a number
|
||||
} else {
|
||||
settings.mycall = mycall; // Use the original mycall if no SSID is present
|
||||
settings.myssid = 0; // Default SSID if not provided
|
||||
settings.remote.STATION.mycall = mycall; // Use the original mycall if no SSID is present
|
||||
settings.remote.STATION.myssid = 0; // Default SSID if not provided
|
||||
}
|
||||
} else {
|
||||
settings[variableName] = data[category][setting];
|
||||
|
|
Loading…
Reference in a new issue