From 60b68612ab36fd63c92fe302fb78c866d70751ca Mon Sep 17 00:00:00 2001 From: Pedro Date: Sat, 18 Nov 2023 14:27:19 +0100 Subject: [PATCH] Fix things. Simplify field value change handling. --- gui/src/components/main_startup_check.vue | 13 +++++---- gui/src/components/settings_hamlib.vue | 31 +++++++++++----------- gui/src/components/settings_rigcontrol.vue | 9 +++---- gui/src/components/settings_station.vue | 9 +++---- gui/src/js/settingsHandler.ts | 9 +------ gui/src/store/settingsStore.js | 3 --- 6 files changed, 30 insertions(+), 44 deletions(-) diff --git a/gui/src/components/main_startup_check.vue b/gui/src/components/main_startup_check.vue index cf16fcbe..a198d163 100644 --- a/gui/src/components/main_startup_check.vue +++ b/gui/src/components/main_startup_check.vue @@ -8,8 +8,7 @@ import { setActivePinia } from "pinia"; import pinia from "../store/index"; setActivePinia(pinia); -import { settingsStore as settings } from "../store/settingsStore.js"; -import { handleFieldValueChange } from "../js/settingsHandler"; +import { settingsStore as settings, onChange } from "../store/settingsStore.js"; import { useAudioStore } from "../store/audioStore.js"; const audio = useAudioStore(pinia); @@ -43,7 +42,7 @@ function getNetworkState() { } function getRigControlStuff() { - switch (settings.remote.RADIO.radiocontrol) { + switch (settings.remote.RADIO.control) { case "disabled": return true; case "rigctld": @@ -210,7 +209,7 @@ function testHamlib() { aria-label=".form-select-sm" data-section="AUDIO" data-setting="input_device" - @change="handleFieldValueChange" + @change="onChange" v-model="settings.remote.AUDIO.input_device" v-html="audio.getInputDevices()" > @@ -268,7 +267,7 @@ function testHamlib() { id="rigcontrol_radiocontrol" data-section="RADIO" data-setting="control" - @change="handleFieldValueChange" + @change="onChange" v-model="settings.remote.RADIO.control" >