feat(webui): world state config #2318

Merged
Sainan merged 3 commits from webui-ws into main 2025-06-26 19:32:54 -07:00
Showing only changes of commit 1cf5795aee - Show all commits

View File

@ -1898,7 +1898,8 @@ single.getRoute("/webui/cheats").on("beforeload", function () {
url: "/custom/getConfig?" + window.authz, url: "/custom/getConfig?" + window.authz,
contentType: "application/json", contentType: "application/json",
data: JSON.stringify(uiConfigs) data: JSON.stringify(uiConfigs)
}).done(json => { })
.done(json => {
//window.is_admin = true; //window.is_admin = true;
$(".config-admin-hide").addClass("d-none"); $(".config-admin-hide").addClass("d-none");
$(".config-admin-show").removeClass("d-none"); $(".config-admin-show").removeClass("d-none");
@ -1913,7 +1914,8 @@ single.getRoute("/webui/cheats").on("beforeload", function () {
} }
} }
}); });
}).fail(res => { })
.fail(res => {
if (res.responseText == "Log-in expired") { if (res.responseText == "Log-in expired") {
revalidateAuthz().then(() => { revalidateAuthz().then(() => {
if (single.getCurrentPath() == "/webui/cheats") { if (single.getCurrentPath() == "/webui/cheats") {