mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
[CodeFactor] Apply fixes
This commit is contained in:
parent
a2130fab5e
commit
2582972c34
|
@ -6,7 +6,7 @@ import { setActivePinia } from "pinia";
|
||||||
import pinia from "../store/index";
|
import pinia from "../store/index";
|
||||||
setActivePinia(pinia);
|
setActivePinia(pinia);
|
||||||
|
|
||||||
import { settingsStore as settings} from "../store/settingsStore.js";
|
import { settingsStore as settings } from "../store/settingsStore.js";
|
||||||
|
|
||||||
import { useStateStore } from "../store/stateStore.js";
|
import { useStateStore } from "../store/stateStore.js";
|
||||||
const state = useStateStore(pinia);
|
const state = useStateStore(pinia);
|
||||||
|
|
|
@ -77,9 +77,7 @@ function set_hamlib_rf_level() {
|
||||||
id="dropdownMenuButton"
|
id="dropdownMenuButton"
|
||||||
data-bs-toggle="dropdown"
|
data-bs-toggle="dropdown"
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
>
|
></button>
|
||||||
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- Dropdown Menu -->
|
<!-- Dropdown Menu -->
|
||||||
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||||
|
|
|
@ -8,7 +8,7 @@ setActivePinia(pinia);
|
||||||
import { useChatStore } from "../store/chatStore.js";
|
import { useChatStore } from "../store/chatStore.js";
|
||||||
const chat = useChatStore(pinia);
|
const chat = useChatStore(pinia);
|
||||||
|
|
||||||
import { settingsStore as settings} from "../store/settingsStore.js";
|
import { settingsStore as settings } from "../store/settingsStore.js";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
deleteChatByCallsign,
|
deleteChatByCallsign,
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
<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";
|
||||||
setActivePinia(pinia);
|
setActivePinia(pinia);
|
||||||
|
|
||||||
import { settingsStore as settings} from "../store/settingsStore.js";
|
import { settingsStore as settings } from "../store/settingsStore.js";
|
||||||
|
|
||||||
function saveSettings() {
|
function saveSettings() {
|
||||||
saveSettingsToFile();
|
saveSettingsToFile();
|
||||||
|
|
|
@ -6,8 +6,7 @@ setActivePinia(pinia);
|
||||||
import { useStateStore } from "../store/stateStore.js";
|
import { useStateStore } from "../store/stateStore.js";
|
||||||
const state = useStateStore(pinia);
|
const state = useStateStore(pinia);
|
||||||
|
|
||||||
import { settingsStore as settings} from "../store/settingsStore.js";
|
import { settingsStore as settings } from "../store/settingsStore.js";
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { setActivePinia } from "pinia";
|
||||||
import pinia from "../store/index";
|
import pinia from "../store/index";
|
||||||
setActivePinia(pinia);
|
setActivePinia(pinia);
|
||||||
|
|
||||||
import { settingsStore as settings} from "../store/settingsStore.js";
|
import { settingsStore as settings } from "../store/settingsStore.js";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { setActivePinia } from "pinia";
|
||||||
import pinia from "../store/index";
|
import pinia from "../store/index";
|
||||||
setActivePinia(pinia);
|
setActivePinia(pinia);
|
||||||
|
|
||||||
import { settingsStore as settings} from "../store/settingsStore.js";
|
import { settingsStore as settings } from "../store/settingsStore.js";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { setActivePinia } from "pinia";
|
||||||
import pinia from "../store/index";
|
import pinia from "../store/index";
|
||||||
setActivePinia(pinia);
|
setActivePinia(pinia);
|
||||||
|
|
||||||
import { settingsStore as settings} from "../store/settingsStore.js";
|
import { settingsStore as settings } from "../store/settingsStore.js";
|
||||||
|
|
||||||
function saveSettings() {
|
function saveSettings() {
|
||||||
saveSettingsToFile();
|
saveSettingsToFile();
|
||||||
|
|
|
@ -318,7 +318,10 @@ import { serialDeviceOptions } from "../js/deviceFormHelper";
|
||||||
@change="onChange"
|
@change="onChange"
|
||||||
v-model="settings.remote.RADIO.serial_port"
|
v-model="settings.remote.RADIO.serial_port"
|
||||||
>
|
>
|
||||||
<option v-for="option in serialDeviceOptions()" v-bind:value="option.port">
|
<option
|
||||||
|
v-for="option in serialDeviceOptions()"
|
||||||
|
v-bind:value="option.port"
|
||||||
|
>
|
||||||
{{ option.port }}
|
{{ option.port }}
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -6,7 +6,6 @@ import pinia from "../store/index";
|
||||||
setActivePinia(pinia);
|
setActivePinia(pinia);
|
||||||
|
|
||||||
import { settingsStore as settings, onChange } from "../store/settingsStore.js";
|
import { settingsStore as settings, onChange } from "../store/settingsStore.js";
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -13,12 +13,12 @@ const chat = useChatStore(pinia);
|
||||||
import { useStateStore } from "../store/stateStore.js";
|
import { useStateStore } from "../store/stateStore.js";
|
||||||
const state = useStateStore(pinia);
|
const state = useStateStore(pinia);
|
||||||
|
|
||||||
import { settingsStore as settings} from "../store/settingsStore.js";
|
import { settingsStore as settings } from "../store/settingsStore.js";
|
||||||
|
|
||||||
import { displayToast } from "./popupHandler.js";
|
import { displayToast } from "./popupHandler.js";
|
||||||
|
|
||||||
//const FD = require("./src/js/freedata.js");
|
//const FD = require("./src/js/freedata.js");
|
||||||
import { btoa_FD,sortByProperty } from "./freedata.js";
|
import { btoa_FD, sortByProperty } from "./freedata.js";
|
||||||
|
|
||||||
// define default message object
|
// define default message object
|
||||||
interface Attachment {
|
interface Attachment {
|
||||||
|
@ -592,7 +592,7 @@ function addObjToDatabase(newobj) {
|
||||||
console.log("new database entry");
|
console.log("new database entry");
|
||||||
console.log(response);
|
console.log(response);
|
||||||
|
|
||||||
if (newobj.command === "msg" || newobj.command==="newchat") {
|
if (newobj.command === "msg" || newobj.command === "newchat") {
|
||||||
chat.unsorted_chat_list.push(newobj);
|
chat.unsorted_chat_list.push(newobj);
|
||||||
chat.sorted_chat_list = sortChatList();
|
chat.sorted_chat_list = sortChatList();
|
||||||
}
|
}
|
||||||
|
@ -696,27 +696,26 @@ function deleteFromDatabaseByCallsign(callsign) {
|
||||||
/**
|
/**
|
||||||
* Add a newuser to the database, for when newuser button is clicked
|
* Add a newuser to the database, for when newuser button is clicked
|
||||||
* @param {string} call callsign of new user
|
* @param {string} call callsign of new user
|
||||||
*/
|
*/
|
||||||
export function startChatWithNewStation(call) {
|
export function startChatWithNewStation(call) {
|
||||||
let newchat: newChatDefaultObject = {
|
let newchat: newChatDefaultObject = {
|
||||||
command: "newchat",
|
command: "newchat",
|
||||||
is_new: false,
|
is_new: false,
|
||||||
timestamp: Math.floor((new Date()).getTime() / 1000),
|
timestamp: Math.floor(new Date().getTime() / 1000),
|
||||||
dxcallsign: call,
|
dxcallsign: call,
|
||||||
};
|
|
||||||
addObjToDatabase(newchat);
|
|
||||||
if (!chat.sorted_beacon_list[call]) {
|
|
||||||
// If not, initialize it with an empty array for snr values
|
|
||||||
chat.sorted_beacon_list[call] = {
|
|
||||||
call,
|
|
||||||
snr: [],
|
|
||||||
timestamp: [],
|
|
||||||
};
|
};
|
||||||
chat.callsign_list.add(call);
|
addObjToDatabase(newchat);
|
||||||
}
|
if (!chat.sorted_beacon_list[call]) {
|
||||||
//chat.unsorted_chat_list.push(newchat);
|
// If not, initialize it with an empty array for snr values
|
||||||
//chat.sorted_chat_list = sortChatList();
|
chat.sorted_beacon_list[call] = {
|
||||||
|
call,
|
||||||
|
snr: [],
|
||||||
|
timestamp: [],
|
||||||
|
};
|
||||||
|
chat.callsign_list.add(call);
|
||||||
|
}
|
||||||
|
//chat.unsorted_chat_list.push(newchat);
|
||||||
|
//chat.sorted_chat_list = sortChatList();
|
||||||
}
|
}
|
||||||
|
|
||||||
// function for handling a received beacon
|
// function for handling a received beacon
|
||||||
|
|
|
@ -16,7 +16,7 @@ setActivePinia(pinia);
|
||||||
import { useStateStore } from "../store/stateStore.js";
|
import { useStateStore } from "../store/stateStore.js";
|
||||||
const stateStore = useStateStore(pinia);
|
const stateStore = useStateStore(pinia);
|
||||||
|
|
||||||
import { settingsStore as settings} from "../store/settingsStore.js";
|
import { settingsStore as settings } from "../store/settingsStore.js";
|
||||||
|
|
||||||
export function connectionFailed(endpoint, event) {
|
export function connectionFailed(endpoint, event) {
|
||||||
stateStore.modem_connection = "disconnected";
|
stateStore.modem_connection = "disconnected";
|
||||||
|
|
|
@ -18,7 +18,7 @@ setActivePinia(pinia);
|
||||||
import { useStateStore } from "../store/stateStore.js";
|
import { useStateStore } from "../store/stateStore.js";
|
||||||
const stateStore = useStateStore(pinia);
|
const stateStore = useStateStore(pinia);
|
||||||
|
|
||||||
import { settingsStore as settings} from "../store/settingsStore.js";
|
import { settingsStore as settings } from "../store/settingsStore.js";
|
||||||
|
|
||||||
var client = new net.Socket();
|
var client = new net.Socket();
|
||||||
var socketchunk = ""; // Current message, per connection.
|
var socketchunk = ""; // Current message, per connection.
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { setActivePinia } from "pinia";
|
||||||
import pinia from "../store/index";
|
import pinia from "../store/index";
|
||||||
setActivePinia(pinia);
|
setActivePinia(pinia);
|
||||||
|
|
||||||
import { settingsStore as settings} from "../store/settingsStore.js";
|
import { settingsStore as settings } from "../store/settingsStore.js";
|
||||||
|
|
||||||
var spectrum = new Object();
|
var spectrum = new Object();
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ if (settingsStore.remote.STATION.mycall === "") {
|
||||||
getRemote();
|
getRemote();
|
||||||
}
|
}
|
||||||
|
|
||||||
watch (settingsStore.local, (oldValue, newValue) => {
|
watch(settingsStore.local, (oldValue, newValue) => {
|
||||||
// TODO handle local file saving
|
// TODO handle local file saving
|
||||||
const cenas = newValue;
|
const cenas = newValue;
|
||||||
})
|
});
|
||||||
|
|
Loading…
Reference in a new issue