Limit inline settings messages to errors; restore status text defaults

This commit is contained in:
Aaron
2025-12-13 10:45:29 -05:00
parent 2c60ba981b
commit 28acb94a6f
2 changed files with 8 additions and 16 deletions

View File

@@ -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() {