Limit inline settings messages to errors; restore status text defaults
This commit is contained in:
@@ -425,15 +425,6 @@ body {
|
||||
#releaseProgress {
|
||||
display: none;
|
||||
}
|
||||
.status-msg {
|
||||
display: none;
|
||||
}
|
||||
.status-msg.error {
|
||||
display: block;
|
||||
}
|
||||
#releaseStatusMsg {
|
||||
display: block;
|
||||
}
|
||||
.updates-status {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -115,14 +115,15 @@ export function initUpdateSettings({
|
||||
|
||||
function showMessage(text, isError = false) {
|
||||
if (!msgEl) return;
|
||||
msgEl.textContent = text || "";
|
||||
msgEl.classList.toggle("error", isError);
|
||||
|
||||
if (text) {
|
||||
if (toast && msgEl.id !== "updatesMsg") toast(text, isError ? "error" : "success");
|
||||
setTimeout(() => (msgEl.textContent = ""), 2500);
|
||||
// Only surface inline text for errors; successes go to toast only.
|
||||
if (isError) {
|
||||
msgEl.textContent = text || "Something went wrong";
|
||||
msgEl.classList.add("error");
|
||||
} else {
|
||||
msgEl.textContent = "";
|
||||
msgEl.classList.remove("error");
|
||||
}
|
||||
|
||||
if (toast) toast(text || (isError ? "Error" : ""), isError ? "error" : "success");
|
||||
}
|
||||
|
||||
function currentConfigFromForm() {
|
||||
|
||||
Reference in New Issue
Block a user