XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

SpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 1 Star 0
返回提交历史

XFEstudio/SpaceNinjaServer

fix(webui): update cached config when making changes (#4088)

Closes #4086 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/4088 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

0b7c604b
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

1 个文件 +6 -1
Modified static/webui/script.js +6 -1
@@ -3383,14 +3383,19 @@ for (const id of uiConfigs) {
3383 3383 url: "/custom/setConfig?" + window.authz,
3384 3384 contentType: "application/json",
3385 3385 data: JSON.stringify({ [id]: value })
3386 }).done(function () {
3387 config_data[id] = value;
3386 3388 });
3387 3389 };
3388 3390 } else if (elm.type == "checkbox") {
3389 3391 elm.onchange = function () {
3392 const value = this.checked;
3390 3393 $.post({
3391 3394 url: "/custom/setConfig?" + window.authz,
3392 3395 contentType: "application/json",
3393 data: JSON.stringify({ [id]: this.checked })
3396 data: JSON.stringify({ [id]: value })
3397 }).done(function () {
3398 config_data[id] = value;
3394 3399 });
3395 3400 };
3396 3401 }