Skip to content

Commit

Permalink
Add break alert
Browse files Browse the repository at this point in the history
  • Loading branch information
spiceywasabi committed Aug 27, 2024
1 parent 5cf1a98 commit 1f9bcd9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,11 @@ async function disconnect() {
async function setStatusAlert(message, status = "success") {
let constructedStatus = "alert-" + status;
statusAlertBox.classList.add(constructedStatus);
statusAlertBox.innerText = message;
if(message.includes("</a>")){
statusAlertBox.innerHTML = message;
} else {
statusAlertBox.innerText = message;
}
statusAlertBox.classList.remove("d-none");
}

Expand Down Expand Up @@ -1488,6 +1492,9 @@ function toggleUIConnected(connected, msg = "") {
lbl = "Error";
sdstat("error","hardware-missing");
let err = `${message} Click the Help button below for common fixes. Then refresh this page to attempt flashing again.`;
if(message.toLowerCase().includes("break")){
err = `${message}. To fix this issue please go to <a href="https://o.mg.lol/setup/breakfix.html">https://o.mg.lol/setup/breakfix.html</a>.`
}
setStatusAlert(err, "danger");
accordionExpand(2);
accordionDisable();
Expand Down

0 comments on commit 1f9bcd9

Please sign in to comment.