Prettified Code!

This commit is contained in:
Mashintime 2023-02-13 00:13:55 +00:00 committed by GitHub Action
parent ed31503b0b
commit a6d028f57e

View file

@ -233,9 +233,7 @@ client.on("data", function (socketdata) {
// ----------- catch tnc messages START ----------- // ----------- catch tnc messages START -----------
if (data["freedata"] == "tnc-message") { if (data["freedata"] == "tnc-message") {
switch (data["fec"]) { switch (data["fec"]) {
case "is_writing": case "is_writing":
// CQ TRANSMITTING // CQ TRANSMITTING
ipcRenderer.send("request-show-fec-toast-iswriting", { ipcRenderer.send("request-show-fec-toast-iswriting", {
@ -245,7 +243,6 @@ client.on("data", function (socketdata) {
} }
switch (data["cq"]) { switch (data["cq"]) {
case "transmitting": case "transmitting":
// CQ TRANSMITTING // CQ TRANSMITTING
ipcRenderer.send("request-show-cq-toast-transmitting", { ipcRenderer.send("request-show-cq-toast-transmitting", {
@ -255,12 +252,13 @@ client.on("data", function (socketdata) {
case "received": case "received":
// CQ RECEIVED // CQ RECEIVED
ipcRenderer.send("request-show-cq-toast-received", { data: [data] }); ipcRenderer.send("request-show-cq-toast-received", {
data: [data],
});
break; break;
} }
switch (data["qrv"]) { switch (data["qrv"]) {
case "transmitting": case "transmitting":
// QRV TRANSMITTING // QRV TRANSMITTING
ipcRenderer.send("request-show-qrv-toast-transmitting", { ipcRenderer.send("request-show-qrv-toast-transmitting", {
@ -270,12 +268,13 @@ client.on("data", function (socketdata) {
case "received": case "received":
// QRV RECEIVED // QRV RECEIVED
ipcRenderer.send("request-show-qrv-toast-received", { data: [data] }); ipcRenderer.send("request-show-qrv-toast-received", {
data: [data],
});
break; break;
} }
switch (data["beacon"]) { switch (data["beacon"]) {
case "transmitting": case "transmitting":
// BEACON TRANSMITTING // BEACON TRANSMITTING
ipcRenderer.send("request-show-beacon-toast-transmitting", { ipcRenderer.send("request-show-beacon-toast-transmitting", {
@ -293,7 +292,6 @@ client.on("data", function (socketdata) {
} }
switch (data["ping"]) { switch (data["ping"]) {
case "transmitting": case "transmitting":
// PING TRANSMITTING // PING TRANSMITTING
ipcRenderer.send("request-show-ping-toast-transmitting", { ipcRenderer.send("request-show-ping-toast-transmitting", {
@ -320,9 +318,7 @@ client.on("data", function (socketdata) {
// ARQ SESSION && freedata == tnc-message // ARQ SESSION && freedata == tnc-message
if (data["arq"] == "session") { if (data["arq"] == "session") {
switch (data["status"]) { switch (data["status"]) {
case "connecting": case "connecting":
// ARQ Open // ARQ Open
ipcRenderer.send("request-show-arq-toast-session-connecting", { ipcRenderer.send("request-show-arq-toast-session-connecting", {
@ -361,9 +357,7 @@ client.on("data", function (socketdata) {
} }
// ARQ TRANSMISSION && freedata == tnc-message // ARQ TRANSMISSION && freedata == tnc-message
if (data["arq"] == "transmission") { if (data["arq"] == "transmission") {
switch (data["status"]) { switch (data["status"]) {
case "opened": case "opened":
// ARQ Open // ARQ Open
ipcRenderer.send("request-show-arq-toast-datachannel-opened", { ipcRenderer.send("request-show-arq-toast-datachannel-opened", {
@ -376,11 +370,13 @@ client.on("data", function (socketdata) {
if (data["irs"] == "False") { if (data["irs"] == "False") {
ipcRenderer.send("request-show-arq-toast-datachannel-opening", { ipcRenderer.send("request-show-arq-toast-datachannel-opening", {
data: [data], data: [data],
})} else { });
} else {
ipcRenderer.send( ipcRenderer.send(
"request-show-arq-toast-datachannel-received-opener", "request-show-arq-toast-datachannel-received-opener",
{ data: [data] } { data: [data] }
)}; );
}
break; break;
case "waiting": case "waiting":