mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
much more linting...
This commit is contained in:
parent
bdf7f546a8
commit
783c47f9ef
18 changed files with 19 additions and 147 deletions
|
@ -1,5 +1,4 @@
|
|||
import { ipcRenderer } from "electron";
|
||||
import { autoUpdater } from "electron-updater";
|
||||
|
||||
function domReady(
|
||||
condition: DocumentReadyState[] = ["complete", "interactive"],
|
||||
|
|
|
@ -1,26 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
import { saveSettingsToFile } from "../js/settingsHandler";
|
||||
|
||||
import { setActivePinia } from "pinia";
|
||||
import pinia from "../store/index";
|
||||
setActivePinia(pinia);
|
||||
|
||||
import { useSettingsStore } from "../store/settingsStore.js";
|
||||
const settings = useSettingsStore(pinia);
|
||||
|
||||
import { useStateStore } from "../store/stateStore.js";
|
||||
const state = useStateStore(pinia);
|
||||
|
||||
import { useChatStore } from "../store/chatStore.js";
|
||||
const chat = useChatStore(pinia);
|
||||
|
||||
import chat_navbar from "./chat_navbar.vue";
|
||||
import chat_conversations from "./chat_conversations.vue";
|
||||
import chat_messages from "./chat_messages.vue";
|
||||
import chat_new_message from "./chat_new_message.vue";
|
||||
|
||||
import { updateAllChat, newMessage } from "../js/chatHandler";
|
||||
|
||||
//updateAllChat();
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
<script setup lang="ts">
|
||||
import { saveSettingsToFile } from "../js/settingsHandler";
|
||||
|
||||
import { setActivePinia } from "pinia";
|
||||
import pinia from "../store/index";
|
||||
setActivePinia(pinia);
|
||||
|
||||
import { useSettingsStore } from "../store/settingsStore.js";
|
||||
const settings = useSettingsStore(pinia);
|
||||
|
||||
import { useStateStore } from "../store/stateStore.js";
|
||||
const state = useStateStore(pinia);
|
||||
|
||||
import { useChatStore } from "../store/chatStore.js";
|
||||
const chat = useChatStore(pinia);
|
||||
|
@ -19,7 +13,6 @@ import {
|
|||
resetIsNewMessage,
|
||||
} from "../js/chatHandler";
|
||||
|
||||
import chat_conversations_entry from "./chat_conversations_entry.vue";
|
||||
|
||||
function chatSelected(callsign) {
|
||||
chat.selectedCallsign = callsign.toUpperCase();
|
||||
|
@ -90,6 +83,5 @@ function chatSelected(callsign) {
|
|||
</div>
|
||||
</a>
|
||||
</template>
|
||||
<!--<chat_conversations_entry/>-->
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -1,15 +1,10 @@
|
|||
<script setup lang="ts">
|
||||
import { saveSettingsToFile } from "../js/settingsHandler";
|
||||
|
||||
import { setActivePinia } from "pinia";
|
||||
import pinia from "../store/index";
|
||||
setActivePinia(pinia);
|
||||
|
||||
import { useSettingsStore } from "../store/settingsStore.js";
|
||||
const settings = useSettingsStore(pinia);
|
||||
|
||||
import { useStateStore } from "../store/stateStore.js";
|
||||
const state = useStateStore(pinia);
|
||||
|
||||
import { useChatStore } from "../store/chatStore.js";
|
||||
const chat = useChatStore(pinia);
|
||||
|
|
|
@ -74,8 +74,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { Modal } from "bootstrap";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { atob_FD } from "../js/freedata";
|
||||
|
||||
import {
|
||||
|
|
|
@ -1,15 +1,10 @@
|
|||
<script setup lang="ts">
|
||||
// @ts-nocheck
|
||||
|
||||
import { saveSettingsToFile } from "../js/settingsHandler";
|
||||
|
||||
import { setActivePinia } from "pinia";
|
||||
import pinia from "../store/index";
|
||||
setActivePinia(pinia);
|
||||
|
||||
import { useSettingsStore } from "../store/settingsStore.js";
|
||||
const settings = useSettingsStore(pinia);
|
||||
|
||||
import { useStateStore } from "../store/stateStore.js";
|
||||
const state = useStateStore(pinia);
|
||||
|
||||
|
@ -23,14 +18,13 @@ import {
|
|||
CategoryScale,
|
||||
LinearScale,
|
||||
PointElement,
|
||||
LineElement,
|
||||
Title,
|
||||
Tooltip,
|
||||
Legend,
|
||||
BarElement,
|
||||
} from "chart.js";
|
||||
|
||||
import { Line, Scatter, Bar } from "vue-chartjs";
|
||||
import { Bar } from "vue-chartjs";
|
||||
import { ref, computed } from "vue";
|
||||
import annotationPlugin from "chartjs-plugin-annotation";
|
||||
|
||||
|
@ -108,8 +102,6 @@ try {
|
|||
} catch (e) {
|
||||
console.log(e);
|
||||
|
||||
var beaconLabels = [];
|
||||
var beaconData = [];
|
||||
}
|
||||
|
||||
const beaconHistogramData = computed(() => ({
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<script setup lang="ts">
|
||||
import { saveSettingsToFile } from "../js/settingsHandler";
|
||||
|
||||
import { setActivePinia } from "pinia";
|
||||
import pinia from "../store/index";
|
||||
|
@ -8,9 +7,6 @@ setActivePinia(pinia);
|
|||
import { useStateStore } from "../store/stateStore.js";
|
||||
const state = useStateStore(pinia);
|
||||
|
||||
import { useSettingsStore } from "../store/settingsStore.js";
|
||||
const settings = useSettingsStore(pinia);
|
||||
|
||||
import main_modals from "./main_modals.vue";
|
||||
import main_top_navbar from "./main_top_navbar.vue";
|
||||
import main_audio from "./main_audio.vue";
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
<script setup lang="ts">
|
||||
import { saveSettingsToFile } from "../js/settingsHandler";
|
||||
|
||||
import { setActivePinia } from "pinia";
|
||||
import pinia from "../store/index";
|
||||
setActivePinia(pinia);
|
||||
|
||||
import { useSettingsStore } from "../store/settingsStore.js";
|
||||
const settings = useSettingsStore(pinia);
|
||||
|
||||
import { useStateStore } from "../store/stateStore.js";
|
||||
const state = useStateStore(pinia);
|
||||
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
// @ts-nocheck
|
||||
const {
|
||||
locatorToLatLng,
|
||||
distance,
|
||||
bearingDistance,
|
||||
latLngToLocator,
|
||||
} = require("qth-locator");
|
||||
|
||||
import { saveSettingsToFile } from "../js/settingsHandler";
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
<script setup lang="ts">
|
||||
import { saveSettingsToFile } from "../js/settingsHandler";
|
||||
|
||||
import { setActivePinia } from "pinia";
|
||||
import pinia from "../store/index";
|
||||
setActivePinia(pinia);
|
||||
|
||||
import { useSettingsStore } from "../store/settingsStore.js";
|
||||
const settings = useSettingsStore(pinia);
|
||||
|
||||
import { useStateStore } from "../store/stateStore.js";
|
||||
const state = useStateStore(pinia);
|
||||
|
|
|
@ -23,7 +23,7 @@ import {
|
|||
Legend,
|
||||
} from "chart.js";
|
||||
import { Line, Scatter } from "vue-chartjs";
|
||||
import { ref, computed } from "vue";
|
||||
import { computed } from "vue";
|
||||
|
||||
function selectStatsControl(obj) {
|
||||
switch (obj.delegateTarget.id) {
|
||||
|
|
|
@ -29,12 +29,6 @@ function deleteChat() {
|
|||
deleteChatByCallsign(chat.selectedCallsign);
|
||||
}
|
||||
|
||||
function deleteSelectedMessage() {
|
||||
chat.arq_speed_list_bpm = [];
|
||||
chat.arq_speed_list_timestamp = [];
|
||||
chat.arq_speed_list_snr = [];
|
||||
chat.selectedMessageObject = [];
|
||||
}
|
||||
|
||||
import {
|
||||
Chart as ChartJS,
|
||||
|
@ -47,7 +41,7 @@ import {
|
|||
Legend,
|
||||
} from "chart.js";
|
||||
import { Line } from "vue-chartjs";
|
||||
import { ref, computed } from "vue";
|
||||
import { computed } from "vue";
|
||||
|
||||
ChartJS.register(
|
||||
CategoryScale,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
//var net = require("net");
|
||||
var net = require("node:net");
|
||||
|
||||
const path = require("path");
|
||||
const { ipcRenderer } = require("electron");
|
||||
// ----------------- init pinia stores -------------
|
||||
import { setActivePinia } from "pinia";
|
||||
|
@ -37,13 +36,8 @@ function connectDAEMON() {
|
|||
//client.setTimeout(5000);
|
||||
}
|
||||
|
||||
daemon.on("connect", function (err) {
|
||||
daemon.on("connect", function () {
|
||||
console.log("daemon connection established");
|
||||
let Data = {
|
||||
daemon_connection: daemon.readyState,
|
||||
};
|
||||
ipcRenderer.send("request-update-daemon-connection", Data);
|
||||
|
||||
daemonShowConnectStateError = 1;
|
||||
});
|
||||
|
||||
|
@ -52,15 +46,12 @@ daemon.on("error", function (err) {
|
|||
console.log("daemon connection error");
|
||||
console.log("Make sure the daemon is started.");
|
||||
console.log('Run "python daemon.py" in the modem directory.');
|
||||
|
||||
console.log(err)
|
||||
daemonShowConnectStateError = 0;
|
||||
}
|
||||
setTimeout(connectDAEMON, 500);
|
||||
daemon.destroy();
|
||||
let Data = {
|
||||
daemon_connection: daemon.readyState,
|
||||
};
|
||||
ipcRenderer.send("request-update-daemon-connection", Data);
|
||||
|
||||
});
|
||||
|
||||
/*
|
||||
|
@ -76,12 +67,10 @@ client.on('close', function(data) {
|
|||
|
||||
daemon.on("end", function (data) {
|
||||
console.log("daemon connection ended");
|
||||
console.log(data)
|
||||
daemon.destroy();
|
||||
setTimeout(connectDAEMON, 500);
|
||||
let Data = {
|
||||
daemon_connection: daemon.readyState,
|
||||
};
|
||||
ipcRenderer.send("request-update-daemon-connection", Data);
|
||||
|
||||
});
|
||||
|
||||
//exports.writeDaemonCommand = function(command){
|
||||
|
@ -102,10 +91,6 @@ function writeDaemonCommand(command) {
|
|||
//uiMain.setDAEMONconnection('opening')
|
||||
}
|
||||
|
||||
let Data = {
|
||||
daemon_connection: daemon.readyState,
|
||||
};
|
||||
ipcRenderer.send("request-update-daemon-connection", Data);
|
||||
}
|
||||
|
||||
// "https://stackoverflow.com/questions/9070700/nodejs-net-createserver-large-amount-of-data-coming-in"
|
||||
|
@ -164,10 +149,7 @@ daemon.on("data", function (socketdata) {
|
|||
}
|
||||
|
||||
if (data["command"] == "test_hamlib") {
|
||||
let Data = {
|
||||
hamlib_result: data["result"],
|
||||
};
|
||||
ipcRenderer.send("request-update-hamlib-test", Data);
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -176,18 +158,6 @@ daemon.on("data", function (socketdata) {
|
|||
}
|
||||
});
|
||||
|
||||
function hexToBytes(hex) {
|
||||
for (var bytes = [], c = 0; c < hex.length; c += 2)
|
||||
bytes.push(parseInt(hex.substr(c, 2), 16));
|
||||
return bytes;
|
||||
}
|
||||
|
||||
//exports.getDaemonState = function () {
|
||||
function getDaemonState() {
|
||||
//function getDaemonState(){
|
||||
let command = '{"type" : "get", "command" : "daemon_state"}';
|
||||
writeDaemonCommand(command);
|
||||
}
|
||||
|
||||
// START Modem
|
||||
// ` `== multi line string
|
||||
|
@ -313,22 +283,4 @@ export function startRigctld() {
|
|||
export function stopRigctld() {
|
||||
let command = '{"type" : "set", "command": "stop_rigctld"}';
|
||||
writeDaemonCommand(command);
|
||||
}
|
||||
|
||||
//Save myCall
|
||||
function saveMyCall(callsign) {
|
||||
//exports.saveMyCall = function (callsign) {
|
||||
let command =
|
||||
'{"type" : "set", "command": "mycallsign" , "parameter": "' +
|
||||
callsign +
|
||||
'"}';
|
||||
writeDaemonCommand(command);
|
||||
}
|
||||
|
||||
// Save myGrid
|
||||
//exports.saveMyGrid = function (grid) {
|
||||
function saveMyGrid(grid) {
|
||||
let command =
|
||||
'{"type" : "set", "command": "mygrid" , "parameter": "' + grid + '"}';
|
||||
writeDaemonCommand(command);
|
||||
}
|
||||
}
|
|
@ -1,4 +1,3 @@
|
|||
const fs = require("fs");
|
||||
|
||||
/**
|
||||
* Binary to ASCII replacement
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
//const path = require("path");
|
||||
//const fs = require("fs");
|
||||
//const os = require("os");
|
||||
|
||||
import path from "node:path";
|
||||
import fs from "fs";
|
||||
import os from "os";
|
||||
|
||||
// pinia store setup
|
||||
import { setActivePinia } from "pinia";
|
||||
|
|
|
@ -45,7 +45,7 @@ function connectModem() {
|
|||
client.connect(settings.modem_port, settings.modem_host);
|
||||
}
|
||||
|
||||
client.on("connect", function (data) {
|
||||
client.on("connect", function () {
|
||||
console.log("Modem connection established");
|
||||
|
||||
stateStore.busy_state = "-";
|
||||
|
@ -59,9 +59,10 @@ client.on("connect", function (data) {
|
|||
modemShowConnectStateError = 1;
|
||||
});
|
||||
|
||||
client.on("error", function (data) {
|
||||
client.on("error", function (err) {
|
||||
if (modemShowConnectStateError == 1) {
|
||||
console.log("Modem connection error");
|
||||
console.log(err)
|
||||
modemShowConnectStateError = 0;
|
||||
}
|
||||
setTimeout(connectModem, 500);
|
||||
|
@ -84,6 +85,7 @@ client.on('close', function(data) {
|
|||
|
||||
client.on("end", function (data) {
|
||||
console.log("Modem connection ended");
|
||||
console.log(data)
|
||||
stateStore.busy_state = "-";
|
||||
stateStore.arq_state = "-";
|
||||
stateStore.frequency = "-";
|
||||
|
@ -490,25 +492,6 @@ client.on("data", function (socketdata) {
|
|||
}
|
||||
});
|
||||
|
||||
function hexToBytes(hex) {
|
||||
for (var bytes = [], c = 0; c < hex.length; c += 2)
|
||||
bytes.push(parseInt(hex.substr(c, 2), 16));
|
||||
return bytes;
|
||||
}
|
||||
|
||||
//Get Modem State
|
||||
//exports.getTncState = function () {
|
||||
function getTncState() {
|
||||
var command = '{"type" : "get", "command" : "modem_state"}';
|
||||
writeTncCommand(command);
|
||||
}
|
||||
|
||||
//Get DATA State
|
||||
//exports.getDataState = function () {
|
||||
function getDataState() {
|
||||
var command = '{"type" : "get", "command" : "data_state"}';
|
||||
//writeTncCommand(command)
|
||||
}
|
||||
|
||||
// Send Ping
|
||||
//exports.sendPing = function (dxcallsign) {
|
||||
|
@ -603,7 +586,7 @@ export function sendMessage(obj) {
|
|||
console.log(command);
|
||||
writeTncCommand(command);
|
||||
}
|
||||
|
||||
/*
|
||||
// Send Request message
|
||||
//It would be then „m + split + request + split + request-type“
|
||||
function sendRequest(dxcallsign, mode, frames, data, command) {
|
||||
|
@ -701,7 +684,7 @@ function sendResponseSharedFile(dxcallsign, sharedFile, sharedFileData) {
|
|||
//Command 2 = shared file transfer
|
||||
sendResponse(dxcallsign, 255, 1, sharedFile + "/" + sharedFileData, "res-2");
|
||||
}
|
||||
|
||||
*/
|
||||
//STOP TRANSMISSION
|
||||
export function stopTransmission() {
|
||||
var command = '{"type" : "arq", "command": "stop_transmission"}';
|
||||
|
@ -774,7 +757,7 @@ export function sendFecIsWriting(mycallsign) {
|
|||
// SEND FEC TO BROADCASTCHANNEL
|
||||
//export function sendBroadcastChannel(channel, data_out, uuid) {
|
||||
export function sendBroadcastChannel(obj) {
|
||||
let checksum = obj.checksum;
|
||||
//let checksum = obj.checksum;
|
||||
let command = obj.command;
|
||||
let uuid = obj.uuid;
|
||||
let channel = obj.dxcallsign;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref, computed } from "vue";
|
||||
import { ref } from "vue";
|
||||
|
||||
import { setActivePinia } from "pinia";
|
||||
import pinia from "../store/index";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref, computed } from "vue";
|
||||
import { ref } from "vue";
|
||||
import * as bootstrap from "bootstrap";
|
||||
|
||||
export const useStateStore = defineStore("stateStore", () => {
|
||||
|
|
Loading…
Reference in a new issue