[CodeFactor] Apply fixes

This commit is contained in:
codefactor-io 2023-11-12 21:35:32 +00:00
parent 3349d09654
commit 3c8e77a237
No known key found for this signature in database
GPG key ID: B66B2D63282C190F

View file

@ -125,13 +125,11 @@ export function eventDispatcher(data) {
return; return;
} }
// get ptt state as a first test // get ptt state as a first test
stateStore.ptt_state = data.ptt; stateStore.ptt_state = data.ptt;
// catch modem related events // catch modem related events
if (data["freedata"] == "modem-event") { if (data["freedata"] == "modem-event") {
switch (data["event"]) { switch (data["event"]) {
case "start": case "start":
displayToast("success", "bi-arrow-left-right", "Modem started", 5000); displayToast("success", "bi-arrow-left-right", "Modem started", 5000);
@ -142,16 +140,26 @@ export function eventDispatcher(data) {
return; return;
case "restart": case "restart":
displayToast("secondary", "bi-bootstrap-reboot", "Modem restarted", 5000); displayToast(
"secondary",
"bi-bootstrap-reboot",
"Modem restarted",
5000,
);
return; return;
case "failed": case "failed":
displayToast("danger", "bi-bootstrap-reboot", "Modem startup failed | bad config?", 5000); displayToast(
"danger",
"bi-bootstrap-reboot",
"Modem startup failed | bad config?",
5000,
);
return; return;
} }
} }
/* /*
var message = ""; var message = "";
if (data["freedata"] == "modem-message") { if (data["freedata"] == "modem-message") {