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