From 07af880897bc8530433d7ae6aa7aa626b0131846 Mon Sep 17 00:00:00 2001 From: Sainan Date: Wed, 26 Jun 2024 04:58:35 +0200 Subject: [PATCH 1/3] WebUI: Repurpose "Settings" into "Cheats", show client options --- .prettierignore | 1 + src/routes/webui.ts | 9 +- static/webui/index.html | 497 +++++++++++++++++++--------------------- static/webui/script.js | 25 ++ 4 files changed, 268 insertions(+), 264 deletions(-) diff --git a/.prettierignore b/.prettierignore index 7b977582..ab38eac9 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,2 @@ static/webui/libs/ +*.html diff --git a/src/routes/webui.ts b/src/routes/webui.ts index 93005f34..27ac95e5 100644 --- a/src/routes/webui.ts +++ b/src/routes/webui.ts @@ -19,15 +19,18 @@ webuiRouter.use("/webui", (req, res, next) => { }); // Serve virtual routes -webuiRouter.get("/webui/settings", (_req, res) => { - res.sendFile(path.join(rootDir, "static/webui/index.html")); -}); webuiRouter.get("/webui/inventory", (_req, res) => { res.sendFile(path.join(rootDir, "static/webui/index.html")); }); webuiRouter.get("/webui/mods", (_req, res) => { res.sendFile(path.join(rootDir, "static/webui/index.html")); }); +webuiRouter.get("/webui/settings", (_req, res) => { + res.sendFile(path.join(rootDir, "static/webui/index.html")); +}); +webuiRouter.get("/webui/cheats", (_req, res) => { + res.sendFile(path.join(rootDir, "static/webui/index.html")); +}); // Serve static files webuiRouter.use("/webui", express.static(path.join(rootDir, "static/webui"))); diff --git a/static/webui/index.html b/static/webui/index.html index 037c5280..eed950df 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -1,286 +1,261 @@ - - OpenWF WebUI - - - - - - -
-