forked from OpenWF/SpaceNinjaServer
Apply prettier changes
This commit is contained in:
parent
1c6412a6a4
commit
ba8a3afce5
@ -3,7 +3,7 @@ import path from "path";
|
||||
import fs from "fs";
|
||||
const rootDir = path.join(__dirname, "../../..");
|
||||
|
||||
const updateConfigDataController: RequestHandler = (req) => {
|
||||
const updateConfigDataController: RequestHandler = req => {
|
||||
const updateSettingsData = req.body;
|
||||
|
||||
fs.writeFile(path.join(rootDir, "config.json"), updateSettingsData, function (err: any) {
|
||||
|
@ -96,8 +96,8 @@
|
||||
</div>
|
||||
<div data-route="/webui/inventory" data-title="Inventory | OpenWF WebUI">
|
||||
<p id="refresh-note" class="mb-4">
|
||||
Note: Changes made here will only be reflected in-game when the game re-downloads your inventory.
|
||||
Visiting the navigation should be the easiest way to trigger that.
|
||||
Note: Changes made here will only be reflected in-game when the game re-downloads your
|
||||
inventory. Visiting the navigation should be the easiest way to trigger that.
|
||||
</p>
|
||||
<div class="card mb-4">
|
||||
<h5 class="card-header">Add Items</h5>
|
||||
@ -144,8 +144,8 @@
|
||||
</div>
|
||||
<div data-route="/webui/mods" data-title="Mods | OpenWF WebUI">
|
||||
<p id="refresh-note" class="mb-4">
|
||||
Note: Changes made here will only be reflected in-game when the game re-downloads your inventory.
|
||||
Visiting the navigation should be the easiest way to trigger that.
|
||||
Note: Changes made here will only be reflected in-game when the game re-downloads your
|
||||
inventory. Visiting the navigation should be the easiest way to trigger that.
|
||||
</p>
|
||||
<div class="row">
|
||||
<div class="col-xxl-6">
|
||||
@ -209,7 +209,9 @@
|
||||
<form class="card-body" onsubmit="doChangeSettings();return false;">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" value="" id="skipStoryModeChoice" />
|
||||
<label label class="form-check-label" for="skipStoryModeChoice">Skip Story Mode Choice?</label>
|
||||
<label label class="form-check-label" for="skipStoryModeChoice"
|
||||
>Skip Story Mode Choice?</label
|
||||
>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" value="" id="skipTutorial" />
|
||||
@ -221,7 +223,9 @@
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" value="" id="unlockAllMissions" />
|
||||
<label label class="form-check-label" for="unlockAllMissions">Unlock All Missions?</label>
|
||||
<label label class="form-check-label" for="unlockAllMissions"
|
||||
>Unlock All Missions?</label
|
||||
>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" value="" id="unlockAllQuests" />
|
||||
@ -229,30 +233,47 @@
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" value="" id="completeAllQuests" />
|
||||
<label label class="form-check-label" for="completeAllQuests">Complete All Quests?</label>
|
||||
<label label class="form-check-label" for="completeAllQuests"
|
||||
>Complete All Quests?</label
|
||||
>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" value="" id="infiniteResources" />
|
||||
<label label class="form-check-label" for="infiniteResources">Infinite Credits and Platinum?</label>
|
||||
<label label class="form-check-label" for="infiniteResources"
|
||||
>Infinite Credits and Platinum?</label
|
||||
>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" value="" id="unlockallShipFeatures" />
|
||||
<label label class="form-check-label" for="unlockallShipFeatures">Unlock All Ship Features?</label>
|
||||
<label label class="form-check-label" for="unlockallShipFeatures"
|
||||
>Unlock All Ship Features?</label
|
||||
>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" value="" id="unlockAllShipDecorations" />
|
||||
<label label class="form-check-label" for="unlockAllShipDecorations">Unlock All Ship Decorations?</label>
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
value=""
|
||||
id="unlockAllShipDecorations"
|
||||
/>
|
||||
<label label class="form-check-label" for="unlockAllShipDecorations"
|
||||
>Unlock All Ship Decorations?</label
|
||||
>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" value="" id="unlockAllFlavourItems" />
|
||||
<label label class="form-check-label" for="unlockAllFlavourItems">Unlock All Accessories?</label>
|
||||
<label label class="form-check-label" for="unlockAllFlavourItems"
|
||||
>Unlock All Accessories?</label
|
||||
>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" value="" id="unlockAllSkins" />
|
||||
<label label class="form-check-label" for="unlockAllSkins">Unlock All Skins?</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<label label class="form-check-label" for="spoofMasteryRank">Spoofed Mastery Rank (-1 to disable)</label>
|
||||
<label label class="form-check-label" for="spoofMasteryRank"
|
||||
>Spoofed Mastery Rank (-1 to disable)</label
|
||||
>
|
||||
<input class="form-control" id="spoofMasteryRank" type="number" min="-1" value="" />
|
||||
</div>
|
||||
<button class="btn btn-primary" type="submit">Save Settings</button>
|
||||
|
@ -621,27 +621,29 @@ $("#mod-to-acquire").on("input", () => {
|
||||
});
|
||||
|
||||
function fetchSettings() {
|
||||
fetch('/custom/config')
|
||||
.then((response) => response.json())
|
||||
.then((json) => Object.entries(json).forEach((entry) => {
|
||||
fetch("/custom/config")
|
||||
.then(response => response.json())
|
||||
.then(json =>
|
||||
Object.entries(json).forEach(entry => {
|
||||
const [key, value] = entry;
|
||||
var x = document.getElementById(`${key}`);
|
||||
if (x != null) {
|
||||
if (x.type == "checkbox") {
|
||||
if (value === true) {
|
||||
x.setAttribute("checked", "checked")
|
||||
x.setAttribute("checked", "checked");
|
||||
}
|
||||
} else if (x.type == "number") {
|
||||
x.setAttribute("value", `${value}`)
|
||||
x.setAttribute("value", `${value}`);
|
||||
}
|
||||
}
|
||||
}));
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
function doChangeSettings() {
|
||||
fetch('/custom/config')
|
||||
.then((response) => response.json())
|
||||
.then((json) => {
|
||||
fetch("/custom/config")
|
||||
.then(response => response.json())
|
||||
.then(json => {
|
||||
for (var i in json) {
|
||||
var x = document.getElementById(`${i}`);
|
||||
if (x != null) {
|
||||
@ -660,6 +662,6 @@ function doChangeSettings() {
|
||||
url: "/custom/config",
|
||||
contentType: "text/plain",
|
||||
data: JSON.stringify(json, null, 2)
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user