From 645b159d736ed1bb1908e8674cf30f0a330ba339 Mon Sep 17 00:00:00 2001 From: codefactor-io Date: Mon, 4 Dec 2023 03:49:02 +0000 Subject: [PATCH] [CodeFactor] Apply fixes --- gui/src/components/dynamic_components2.vue | 16 +- gui/src/components/grid_active_audio.vue | 27 +- .../components/grid_active_heard_stations.vue | 4 +- .../grid_active_heard_stations_mini.vue | 10 +- .../components/grid_active_rig_control.vue | 395 +++++++++--------- gui/src/components/grid_active_stats.vue | 300 ++++++------- gui/src/components/grid_dbfs.vue | 109 +++-- gui/src/components/grid_s-meter.vue | 109 +++-- .../components/main_active_heard_stations.vue | 5 +- gui/src/components/main_active_stats.vue | 16 +- gui/src/components/settings_exp.vue | 1 - gui/src/components/settings_gui.vue | 1 - gui/src/js/waterfallHandler.js | 7 +- gui/src/store/settingsStore.js | 1 - 14 files changed, 504 insertions(+), 497 deletions(-) diff --git a/gui/src/components/dynamic_components2.vue b/gui/src/components/dynamic_components2.vue index c45bc016..8e50ff44 100644 --- a/gui/src/components/dynamic_components2.vue +++ b/gui/src/components/dynamic_components2.vue @@ -58,16 +58,8 @@ const gridWidgets = [ { x: 1, y: 1, w: 3, h: 27 }, "Mini Heard stations", ), - new gridWidget( - s_meter, - { x: 1, y: 1, w: 2, h: 4 }, - "S-Meter", - ), - new gridWidget( - dbfs_meter, - { x: 1, y: 1, w: 2, h: 4 }, - "Dbfs Meter", - ), + new gridWidget(s_meter, { x: 1, y: 1, w: 2, h: 4 }, "S-Meter"), + new gridWidget(dbfs_meter, { x: 1, y: 1, w: 2, h: 4 }, "Dbfs Meter"), ]; onMounted(() => { grid = GridStack.init({ @@ -77,8 +69,8 @@ onMounted(() => { minRow: 50, margin: 5, resizable: { - handles: 'se,sw' - } + handles: "se,sw", + }, }); grid.on("dragstop", function (event, element) { diff --git a/gui/src/components/grid_active_audio.vue b/gui/src/components/grid_active_audio.vue index 194979ca..af0741ed 100644 --- a/gui/src/components/grid_active_audio.vue +++ b/gui/src/components/grid_active_audio.vue @@ -16,14 +16,29 @@ function startStopRecordAudio() {
diff --git a/gui/src/components/grid_active_heard_stations.vue b/gui/src/components/grid_active_heard_stations.vue index 191ff332..a38402a1 100644 --- a/gui/src/components/grid_active_heard_stations.vue +++ b/gui/src/components/grid_active_heard_stations.vue @@ -84,7 +84,9 @@ function getMaidenheadDistance(dxGrid) { > - {{ item[1].activity_type }} + {{ + item[1].activity_type + }} {{ item[1].snr }} diff --git a/gui/src/components/grid_active_heard_stations_mini.vue b/gui/src/components/grid_active_heard_stations_mini.vue index 07b3f624..fee7ae7a 100644 --- a/gui/src/components/grid_active_heard_stations_mini.vue +++ b/gui/src/components/grid_active_heard_stations_mini.vue @@ -16,7 +16,7 @@ function getDateTime(timestampRaw) { navigator.language, { hourCycle: "h23", - + month: "2-digit", day: "2-digit", hour: "2-digit", @@ -51,7 +51,7 @@ function getMaidenheadDistance(dxGrid) { Time DXCall - + SNR @@ -60,13 +60,11 @@ function getMaidenheadDistance(dxGrid) { - {{ - getDateTime(item[1].timestamp) - }} + {{ getDateTime(item[1].timestamp) }} - {{ item[1].origin }} + {{ item[1].origin }} {{ item[1].snr }} diff --git a/gui/src/components/grid_active_rig_control.vue b/gui/src/components/grid_active_rig_control.vue index 013b952b..9b82efba 100644 --- a/gui/src/components/grid_active_rig_control.vue +++ b/gui/src/components/grid_active_rig_control.vue @@ -25,208 +25,211 @@ function set_hamlib_rf_level() { diff --git a/gui/src/components/grid_active_stats.vue b/gui/src/components/grid_active_stats.vue index 5902fe3b..a614bec5 100644 --- a/gui/src/components/grid_active_stats.vue +++ b/gui/src/components/grid_active_stats.vue @@ -168,164 +168,167 @@ const scatterChartData = computed(() => ({ })); var localSpectrum; onMounted(() => { - // This code will be executed after the component is mounted to the DOM - // You can access DOM elements or perform other initialization here - //const myElement = this.$refs.waterfall; // Access the DOM element with ref + // This code will be executed after the component is mounted to the DOM + // You can access DOM elements or perform other initialization here + //const myElement = this.$refs.waterfall; // Access the DOM element with ref - // init waterfall + // init waterfall localSpectrum = initWaterfall("waterfall-grid"); - window.addEventListener("wf-data-avail",function(evt) {localSpectrum.addData(evt.detail);},false); + window.addEventListener( + "wf-data-avail", + function (evt) { + localSpectrum.addData(evt.detail); + }, + false, + ); }); -