mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Prettified Code!
This commit is contained in:
parent
3b4be83119
commit
391019a1ce
|
@ -951,7 +951,7 @@ ipcMain.on("request-check-rigctld", (event, data) => {
|
||||||
rigctld_connection_state = true;
|
rigctld_connection_state = true;
|
||||||
Data["state"] =
|
Data["state"] =
|
||||||
"connection possible - (" + data.ip + ":" + data.port + ")";
|
"connection possible - (" + data.ip + ":" + data.port + ")";
|
||||||
Data["active"] = true;
|
Data["active"] = true;
|
||||||
if (win !== null && win !== "" && typeof win != "undefined") {
|
if (win !== null && win !== "" && typeof win != "undefined") {
|
||||||
// try catch for being sure we have a clean app close
|
// try catch for being sure we have a clean app close
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1084,16 +1084,16 @@ window.addEventListener("DOMContentLoaded", () => {
|
||||||
set_CPU_mode();
|
set_CPU_mode();
|
||||||
});
|
});
|
||||||
|
|
||||||
//Handle change of Auto-start settings
|
//Handle change of Auto-start settings
|
||||||
document.getElementById("AutoStartSwitch").addEventListener("click", () => {
|
document.getElementById("AutoStartSwitch").addEventListener("click", () => {
|
||||||
if (document.getElementById("AutoStartSwitch").checked == true) {
|
if (document.getElementById("AutoStartSwitch").checked == true) {
|
||||||
config.auto_start = "1";
|
config.auto_start = "1";
|
||||||
} else {
|
} else {
|
||||||
config.auto_start = "0";
|
config.auto_start = "0";
|
||||||
}
|
}
|
||||||
//fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
//fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
||||||
FD.saveConfig(config, configPath);
|
FD.saveConfig(config, configPath);
|
||||||
});
|
});
|
||||||
|
|
||||||
// enable fsk Switch clicked
|
// enable fsk Switch clicked
|
||||||
document.getElementById("fskModeSwitch").addEventListener("click", () => {
|
document.getElementById("fskModeSwitch").addEventListener("click", () => {
|
||||||
|
@ -3203,7 +3203,7 @@ function checkRigctld() {
|
||||||
|
|
||||||
ipcRenderer.on("action-check-rigctld", (event, data) => {
|
ipcRenderer.on("action-check-rigctld", (event, data) => {
|
||||||
document.getElementById("hamlib_rigctld_status").value = data["state"];
|
document.getElementById("hamlib_rigctld_status").value = data["state"];
|
||||||
rigctlActive=data["active"];
|
rigctlActive = data["active"];
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcRenderer.on("action-set-app-version", (event, data) => {
|
ipcRenderer.on("action-set-app-version", (event, data) => {
|
||||||
|
@ -3443,13 +3443,12 @@ function changeGuiDesign(design) {
|
||||||
|
|
||||||
//update path to css file
|
//update path to css file
|
||||||
document.getElementById("bootstrap_theme").href = escape(theme_path);
|
document.getElementById("bootstrap_theme").href = escape(theme_path);
|
||||||
|
|
||||||
function autostart()
|
function autostart() {
|
||||||
{
|
|
||||||
//Auto start stuff if option is enabled
|
//Auto start stuff if option is enabled
|
||||||
if (config.auto_start == 1) {
|
if (config.auto_start == 1) {
|
||||||
//Start rigctld if radiocontrol is in correct mode and is not active
|
//Start rigctld if radiocontrol is in correct mode and is not active
|
||||||
if (config.radiocontrol == "rigctld" && rigctlActive == false){
|
if (config.radiocontrol == "rigctld" && rigctlActive == false) {
|
||||||
//console.log("Autostarting rigctld");
|
//console.log("Autostarting rigctld");
|
||||||
document.getElementById("hamlib_rigctld_start").click();
|
document.getElementById("hamlib_rigctld_start").click();
|
||||||
}
|
}
|
||||||
|
@ -3458,6 +3457,6 @@ function changeGuiDesign(design) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
autostart()
|
autostart();
|
||||||
}, 1250);
|
}, 1250);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2622,8 +2622,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<div class="badge text-bg-danger">
|
<div class="badge text-bg-danger">
|
||||||
<i class="bi bi-shield-exclamation"></i> These options are experimental and may
|
<i class="bi bi-shield-exclamation"></i> These options are
|
||||||
not work as expected.
|
experimental and may not work as expected.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue