From b7895245e3919fb09ccaaf74a68c79748a64081b Mon Sep 17 00:00:00 2001
From: Sainan <63328889+Sainan@users.noreply.github.com>
Date: Tue, 8 Jul 2025 09:46:49 +0200
Subject: [PATCH] chore(webui): indicate unsaved changes
---
static/webui/index.html | 10 +++++-----
static/webui/script.js | 13 +++++++++++++
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/static/webui/index.html b/static/webui/index.html
index 63d4d936..c155cc05 100644
--- a/static/webui/index.html
+++ b/static/webui/index.html
@@ -803,21 +803,21 @@
-
+
@@ -942,14 +942,14 @@
-
+
diff --git a/static/webui/script.js b/static/webui/script.js
index 9649019e..d2a1987a 100644
--- a/static/webui/script.js
+++ b/static/webui/script.js
@@ -1954,6 +1954,19 @@ for (const id of uiConfigs) {
}
}
+document.querySelectorAll(".config-form .input-group").forEach(grp => {
+ const input = grp.querySelector("input");
+ const btn = grp.querySelector("button");
+ input.oninput = input.onchange = function() {
+ btn.classList.remove("btn-secondary");
+ btn.classList.add("btn-primary");
+ };
+ btn.onclick = function() {
+ btn.classList.remove("btn-primary");
+ btn.classList.add("btn-secondary");
+ };
+});
+
function doSaveConfigInt(id) {
$.post({
url: "/custom/setConfig?" + window.authz + "&wsid=" + wsid,