mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Merge pull request #444 from DJ2LS/ls-gui
This commit is contained in:
commit
81f5134f8e
|
@ -386,6 +386,11 @@ ipcMain.on("request-show-chat-window", () => {
|
||||||
chat.show();
|
chat.show();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ipcMain.on("request-clear-chat-connected", () => {
|
||||||
|
//Clear chat window's connected with text
|
||||||
|
chat.webContents.send("action-clear-reception-status");
|
||||||
|
});
|
||||||
|
|
||||||
// UPDATE TNC CONNECTION
|
// UPDATE TNC CONNECTION
|
||||||
ipcMain.on("request-update-tnc-ip", (event, data) => {
|
ipcMain.on("request-update-tnc-ip", (event, data) => {
|
||||||
win.webContents.send("action-update-tnc-ip", data);
|
win.webContents.send("action-update-tnc-ip", data);
|
||||||
|
@ -454,6 +459,8 @@ ipcMain.on("request-update-transmission-status", (event, arg) => {
|
||||||
|
|
||||||
ipcMain.on("request-update-reception-status", (event, arg) => {
|
ipcMain.on("request-update-reception-status", (event, arg) => {
|
||||||
win.webContents.send("action-update-reception-status", arg);
|
win.webContents.send("action-update-reception-status", arg);
|
||||||
|
chat.webContents.send("action-update-reception-status", arg);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcMain.on("request-open-tnc-log", () => {
|
ipcMain.on("request-open-tnc-log", () => {
|
||||||
|
|
|
@ -661,8 +661,25 @@ ipcRenderer.on("return-select-user-image", (event, arg) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ipcRenderer.on("action-update-reception-status", (event, arg) => {
|
||||||
|
var data = arg["data"][0];
|
||||||
|
|
||||||
|
document.getElementById("txtConnectedWithChat").textContent = data.dxcallsign;
|
||||||
|
});
|
||||||
|
ipcRenderer.on("action-clear-reception-status", (event) => {
|
||||||
|
//Clear connected with textbox
|
||||||
|
let cwc = document.getElementById("txtConnectedWithChat");
|
||||||
|
if (cwc.textContent != "------") {
|
||||||
|
cwc.textContent = "------";
|
||||||
|
//console.log("Reseting connected with");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
ipcRenderer.on("action-update-transmission-status", (event, arg) => {
|
ipcRenderer.on("action-update-transmission-status", (event, arg) => {
|
||||||
var data = arg["data"][0];
|
var data = arg["data"][0];
|
||||||
|
|
||||||
|
document.getElementById("txtConnectedWithChat").textContent = data.dxcallsign;
|
||||||
|
|
||||||
console.log(data.status);
|
console.log(data.status);
|
||||||
if (data.uuid !== "no-uuid") {
|
if (data.uuid !== "no-uuid") {
|
||||||
db.get(data.uuid, {
|
db.get(data.uuid, {
|
||||||
|
|
|
@ -1371,7 +1371,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
||||||
|
|
||||||
// Discord Link clicked
|
// Discord Link clicked
|
||||||
document.getElementById("discordUrl").addEventListener("click", () => {
|
document.getElementById("discordUrl").addEventListener("click", () => {
|
||||||
shell.openExternal("https://discord.gg/jnADeDtxUF");
|
shell.openExternal("https://discord.freedata.app/");
|
||||||
});
|
});
|
||||||
|
|
||||||
// startTNC button clicked
|
// startTNC button clicked
|
||||||
|
@ -2254,6 +2254,7 @@ ipcRenderer.on("action-update-tnc-state", (event, arg) => {
|
||||||
"bi bi-chat-fill text-success me-1";
|
"bi bi-chat-fill text-success me-1";
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("spnConnectedWith").className = "bi bi-chat-fill";
|
document.getElementById("spnConnectedWith").className = "bi bi-chat-fill";
|
||||||
|
ipcRenderer.send("request-clear-chat-connected");
|
||||||
}
|
}
|
||||||
|
|
||||||
// HAMLIB STATUS
|
// HAMLIB STATUS
|
||||||
|
|
|
@ -264,7 +264,18 @@
|
||||||
Help
|
Help
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<span
|
||||||
|
class="input-group-text ms-2"
|
||||||
|
id="txtConnectedWithChat"
|
||||||
|
data-bs-toggle="tooltip"
|
||||||
|
data-bs-trigger="hover"
|
||||||
|
title="Connected with"
|
||||||
|
>------</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue