diff --git a/src/routes/custom.ts b/src/routes/custom.ts index 3a88fefe..9eb3d9e4 100644 --- a/src/routes/custom.ts +++ b/src/routes/custom.ts @@ -14,7 +14,6 @@ import { addMissingMaxRankModsController } from "@/src/controllers/custom/addMis import { webuiFileChangeDetectedController } from "@/src/controllers/custom/webuiFileChangeDetectedController"; import { completeAllMissionsController } from "@/src/controllers/custom/completeAllMissionsController"; import { addMissingHelminthBlueprintsController } from "@/src/controllers/custom/addMissingHelminthBlueprintsController"; -import { editSuitInvigorationUpgradeController } from "@/src/controllers/custom/editSuitInvigorationUpgradeController"; import { createAccountController } from "@/src/controllers/custom/createAccountController"; import { createMessageController } from "@/src/controllers/custom/createMessageController"; @@ -27,6 +26,7 @@ import { setEvolutionProgressController } from "@/src/controllers/custom/setEvol import { setBoosterController } from "@/src/controllers/custom/setBoosterController"; import { updateFingerprintController } from "@/src/controllers/custom/updateFingerprintController"; import { changeModularPartsController } from "@/src/controllers/custom/changeModularPartsController"; +import { editSuitInvigorationUpgradeController } from "@/src/controllers/custom/editSuitInvigorationUpgradeController"; import { getConfigController, setConfigController } from "@/src/controllers/custom/configController"; @@ -46,7 +46,6 @@ customRouter.get("/addMissingMaxRankMods", addMissingMaxRankModsController); customRouter.get("/webuiFileChangeDetected", webuiFileChangeDetectedController); customRouter.get("/completeAllMissions", completeAllMissionsController); customRouter.get("/addMissingHelminthBlueprints", addMissingHelminthBlueprintsController); -customRouter.post("/editSuitInvigorationUpgrade", editSuitInvigorationUpgradeController); customRouter.post("/createAccount", createAccountController); customRouter.post("/createMessage", createMessageController); @@ -59,6 +58,7 @@ customRouter.post("/setEvolutionProgress", setEvolutionProgressController); customRouter.post("/setBooster", setBoosterController); customRouter.post("/updateFingerprint", updateFingerprintController); customRouter.post("/changeModularParts", changeModularPartsController); +customRouter.post("/editSuitInvigorationUpgrade", editSuitInvigorationUpgradeController); customRouter.post("/getConfig", getConfigController); customRouter.post("/setConfig", setConfigController); diff --git a/static/webui/index.html b/static/webui/index.html index 34ef3870..da8087f9 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -455,6 +455,62 @@ +

@@ -977,59 +1033,6 @@
- diff --git a/static/webui/script.js b/static/webui/script.js index 3eccd2bf..dc2e0edf 100644 --- a/static/webui/script.js +++ b/static/webui/script.js @@ -2915,35 +2915,11 @@ function showSuitInvigorationForm(suitData) { document.getElementById("invigoration-expiry").value = ""; } - const form = document.getElementById("editSuitInvigorationForm"); - form.style.display = "block"; - form.style.position = "fixed"; - form.style.top = "50%"; - form.style.left = "50%"; - form.style.transform = "translate(-50%, -50%)"; - form.style.zIndex = "1050"; - form.style.width = "400px"; - - // Add backdrop - const backdrop = document.createElement("div"); - backdrop.id = "invigoration-backdrop"; - backdrop.style.position = "fixed"; - backdrop.style.top = "0"; - backdrop.style.left = "0"; - backdrop.style.width = "100%"; - backdrop.style.height = "100%"; - backdrop.style.backgroundColor = "rgba(0, 0, 0, 0.5)"; - backdrop.style.zIndex = "1040"; - backdrop.onclick = hideSuitInvigorationForm; - document.body.appendChild(backdrop); + document.getElementById("editSuitInvigoration").style.display = "block"; } function hideSuitInvigorationForm() { - document.getElementById("editSuitInvigorationForm").style.display = "none"; - const backdrop = document.getElementById("invigoration-backdrop"); - if (backdrop) { - backdrop.remove(); - } + document.getElementById("editSuitInvigoration").style.display = "none"; } function submitSuitInvigorationUpgrade(event) { diff --git a/static/webui/style.css b/static/webui/style.css index becce85d..d96d5dd7 100644 --- a/static/webui/style.css +++ b/static/webui/style.css @@ -49,3 +49,22 @@ td.text-end > a > svg { padding-right: var(--bs-navbar-nav-link-padding-x); padding-left: var(--bs-navbar-nav-link-padding-x); } + +/* Modal overlay and form styling */ +.modal-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + z-index: 1040; +} +.modal-form { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 1050; + width: 400px; +}