feat(webui): the circuit override #2335

Merged
Sainan merged 2 commits from webui-circuit into main 2025-06-27 20:28:45 -07:00
Showing only changes of commit 5cc3f21d67 - Show all commits

View File

@ -1897,7 +1897,11 @@ function doSaveConfigStringArray(id) {
url: "/custom/setConfig?" + window.authz + "&wsid=" + wsid, url: "/custom/setConfig?" + window.authz + "&wsid=" + wsid,
contentType: "application/json", contentType: "application/json",
data: JSON.stringify({ data: JSON.stringify({
[id]: document.getElementById(id).getAttribute("data-tags-value").split(", ").filter(x => x) [id]: document
.getElementById(id)
.getAttribute("data-tags-value")
.split(", ")
.filter(x => x)
}) })
}); });
} }
@ -2617,7 +2621,7 @@ function setImportSample(key) {
document.querySelectorAll(".tags-input").forEach(input => { document.querySelectorAll(".tags-input").forEach(input => {
const datalist = document.getElementById(input.getAttribute("list")); const datalist = document.getElementById(input.getAttribute("list"));
const options = [...datalist.querySelectorAll("option")].map(x => x.textContent); const options = [...datalist.querySelectorAll("option")].map(x => x.textContent);
input.oninput = function() { input.oninput = function () {
const value = []; const value = [];
for (const tag of this.value.split(",")) { for (const tag of this.value.split(",")) {
const index = options.map(x => x.toLowerCase()).indexOf(tag.trim().toLowerCase()); const index = options.map(x => x.toLowerCase()).indexOf(tag.trim().toLowerCase());