返回提交历史
Modified
static/webui/index.html
+2
-22
Modified
static/webui/script.js
+0
-28
XFEstudio/SpaceNinjaServer
chore(webui): remove client cheats (#883)
This has long been only a very small subset of what the bootstrapper offers. I think it's better that the bootstrapper itself provides the interface for it and we don't duplicate the logic so shallowly. Reviewed-on: http://209.141.38.3/OpenWF/SpaceNinjaServer/pulls/883
241f0c89
代码差异
2 个文件
+2
-50
@@ -368,7 +368,7 @@
368
368
</div>
369
369
<div data-route="/webui/cheats, /webui/settings" data-title="Cheats | OpenWF WebUI">
370
370
<div class="row g-3">
371
<div class="col-lg-4">
371
<div class="col-md-6">
372
372
<div class="card mb-3">
373
373
<h5 class="card-header">Server</h5>
374
374
<div class="card-body">
@@ -479,7 +479,7 @@
479
479
</div>
480
480
</div>
481
481
</div>
482
<div class="col-lg-4">
482
<div class="col-md-6">
483
483
<div class="card mb-3">
484
484
<h5 class="card-header">Account</h5>
485
485
<div class="card-body">
@@ -488,26 +488,6 @@
488
488
</div>
489
489
</div>
490
490
</div>
491
<div class="col-lg-4">
492
<div class="card mb-3">
493
<h5 class="card-header">Client</h5>
494
<div id="client-cheats-nok" class="card-body">
495
Client cheats are currently unavailable. This could be because your client is not running or using a DLL without an HTTP interface.
496
</div>
497
<div id="client-cheats-ok" class="card-body d-none">
498
<div class="form-check">
499
<input class="form-check-input" type="checkbox" id="skip_mission_start_timer" />
500
<label class="form-check-label" for="skip_mission_start_timer">
501
Skip Mission Start Timer
502
</label>
503
</div>
504
<div class="form-group mt-3">
505
<label class="form-label" for="fov_override">FOV Override (0 to disable)</label>
506
<input id="fov_override" class="form-range" type="range" min="0" value="0" max="2260000" step="10000">
507
</div>
508
</div>
509
</div>
510
</div>
511
491
</div>
512
492
</div>
513
493
<div data-route="/webui/import" data-title="Import | OpenWF WebUI">
@@ -915,34 +915,6 @@ single.getRoute("/webui/cheats").on("beforeload", function () {
915
915
});
916
916
}
917
917
}, 10);
918
919
fetch("http://localhost:61558/ping", { mode: "no-cors" })
920
.then(() => {
921
$("#client-cheats-ok").removeClass("d-none");
922
$("#client-cheats-nok").addClass("d-none");
923
924
fetch("http://localhost:61558/skip_mission_start_timer")
925
.then(res => res.text())
926
.then(res => {
927
document.getElementById("skip_mission_start_timer").checked = res == "1";
928
});
929
document.getElementById("skip_mission_start_timer").onchange = function () {
930
fetch("http://localhost:61558/skip_mission_start_timer?" + this.checked);
931
};
932
933
fetch("http://localhost:61558/fov_override")
934
.then(res => res.text())
935
.then(res => {
936
document.getElementById("fov_override").value = parseFloat(res) * 10000;
937
});
938
document.getElementById("fov_override").oninput = function () {
939
fetch("http://localhost:61558/fov_override?" + this.value);
940
};
941
})
942
.catch(function () {
943
$("#client-cheats-nok").removeClass("d-none");
944
$("#client-cheats-ok").addClass("d-none");
945
});
946
918
});
947
919
948
920
function doUnlockAllFocusSchools() {