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
This commit is contained in:
		
							parent
							
								
									9823729aa8
								
							
						
					
					
						commit
						241f0c894a
					
				@ -368,7 +368,7 @@
 | 
			
		||||
            </div>
 | 
			
		||||
            <div data-route="/webui/cheats, /webui/settings" data-title="Cheats | OpenWF WebUI">
 | 
			
		||||
                <div class="row g-3">
 | 
			
		||||
                    <div class="col-lg-4">
 | 
			
		||||
                    <div class="col-md-6">
 | 
			
		||||
                        <div class="card mb-3">
 | 
			
		||||
                            <h5 class="card-header">Server</h5>
 | 
			
		||||
                            <div class="card-body">
 | 
			
		||||
@ -479,7 +479,7 @@
 | 
			
		||||
                            </div>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    </div>
 | 
			
		||||
                    <div class="col-lg-4">
 | 
			
		||||
                    <div class="col-md-6">
 | 
			
		||||
                        <div class="card mb-3">
 | 
			
		||||
                            <h5 class="card-header">Account</h5>
 | 
			
		||||
                            <div class="card-body">
 | 
			
		||||
@ -488,26 +488,6 @@
 | 
			
		||||
                            </div>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    </div>
 | 
			
		||||
                    <div class="col-lg-4">
 | 
			
		||||
                        <div class="card mb-3">
 | 
			
		||||
                            <h5 class="card-header">Client</h5>
 | 
			
		||||
                            <div id="client-cheats-nok" class="card-body">
 | 
			
		||||
                                Client cheats are currently unavailable. This could be because your client is not running or using a DLL without an HTTP interface.
 | 
			
		||||
                            </div>
 | 
			
		||||
                            <div id="client-cheats-ok" class="card-body d-none">
 | 
			
		||||
                                <div class="form-check">
 | 
			
		||||
                                    <input class="form-check-input" type="checkbox" id="skip_mission_start_timer" />
 | 
			
		||||
                                    <label class="form-check-label" for="skip_mission_start_timer">
 | 
			
		||||
                                        Skip Mission Start Timer
 | 
			
		||||
                                    </label>
 | 
			
		||||
                                </div>
 | 
			
		||||
                                <div class="form-group mt-3">
 | 
			
		||||
                                    <label class="form-label" for="fov_override">FOV Override (0 to disable)</label>
 | 
			
		||||
                                    <input id="fov_override" class="form-range" type="range" min="0" value="0" max="2260000" step="10000">
 | 
			
		||||
                                </div>
 | 
			
		||||
                            </div>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div data-route="/webui/import" data-title="Import | OpenWF WebUI">
 | 
			
		||||
 | 
			
		||||
@ -915,34 +915,6 @@ single.getRoute("/webui/cheats").on("beforeload", function () {
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
    }, 10);
 | 
			
		||||
 | 
			
		||||
    fetch("http://localhost:61558/ping", { mode: "no-cors" })
 | 
			
		||||
        .then(() => {
 | 
			
		||||
            $("#client-cheats-ok").removeClass("d-none");
 | 
			
		||||
            $("#client-cheats-nok").addClass("d-none");
 | 
			
		||||
 | 
			
		||||
            fetch("http://localhost:61558/skip_mission_start_timer")
 | 
			
		||||
                .then(res => res.text())
 | 
			
		||||
                .then(res => {
 | 
			
		||||
                    document.getElementById("skip_mission_start_timer").checked = res == "1";
 | 
			
		||||
                });
 | 
			
		||||
            document.getElementById("skip_mission_start_timer").onchange = function () {
 | 
			
		||||
                fetch("http://localhost:61558/skip_mission_start_timer?" + this.checked);
 | 
			
		||||
            };
 | 
			
		||||
 | 
			
		||||
            fetch("http://localhost:61558/fov_override")
 | 
			
		||||
                .then(res => res.text())
 | 
			
		||||
                .then(res => {
 | 
			
		||||
                    document.getElementById("fov_override").value = parseFloat(res) * 10000;
 | 
			
		||||
                });
 | 
			
		||||
            document.getElementById("fov_override").oninput = function () {
 | 
			
		||||
                fetch("http://localhost:61558/fov_override?" + this.value);
 | 
			
		||||
            };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(function () {
 | 
			
		||||
            $("#client-cheats-nok").removeClass("d-none");
 | 
			
		||||
            $("#client-cheats-ok").addClass("d-none");
 | 
			
		||||
        });
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
function doUnlockAllFocusSchools() {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user