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): not saving config fields that aren't already in config.json (#427)

b2453115
Sainan <sainan@calamity.gg>
提交于

代码差异

1 个文件 +19 -2
Modified static/webui/script.js +19 -2
@@ -676,12 +676,29 @@ function fetchSettings() {
676 676 );
677 677 }
678 678
679 const uiConfigs = [
680 "autoCreateAccount",
681 "skipStoryModeChoice",
682 "skipTutorial",
683 "unlockAllScans",
684 "unlockAllMissions",
685 "unlockAllQuests",
686 "completeAllQuests",
687 "infiniteResources",
688 "unlockAllShipFeatures",
689 "unlockAllShipDecorations",
690 "unlockAllFlavourItems",
691 "unlockAllSkins",
692 "universalPolarityEverywhere",
693 "spoofMasteryRank"
694 ];
695
679 696 function doChangeSettings() {
680 697 fetch("/custom/config")
681 698 .then(response => response.json())
682 699 .then(json => {
683 for (var i in json) {
684 var x = document.getElementById(`${i}`);
700 for (const i of uiConfigs) {
701 var x = document.getElementById(i);
685 702 if (x != null) {
686 703 if (x.type == "checkbox") {
687 704 if (x.checked === true) {