From a6c26765ca92f8ad8b72cf218c1bfaa138e359b1 Mon Sep 17 00:00:00 2001
From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
Date: Sat, 20 Sep 2025 21:23:47 +0200
Subject: [PATCH] chore(webui): stick from on top in acquire cards
Also use `d-none` instead `style="display: none;"` in modular cards
---
static/webui/index.html | 270 +++++++++++++++++++++++-----------------
static/webui/script.js | 47 ++++---
2 files changed, 177 insertions(+), 140 deletions(-)
diff --git a/static/webui/index.html b/static/webui/index.html
index a9f44ce4..84a2bf0d 100644
--- a/static/webui/index.html
+++ b/static/webui/index.html
@@ -180,33 +180,37 @@
@@ -215,38 +219,42 @@
@@ -255,28 +263,32 @@
@@ -285,28 +297,32 @@
@@ -315,40 +331,44 @@
@@ -357,36 +377,40 @@
@@ -395,36 +419,40 @@
@@ -433,28 +461,32 @@
@@ -463,29 +495,33 @@
@@ -552,28 +588,32 @@
@@ -807,16 +847,18 @@
-
+
diff --git a/static/webui/script.js b/static/webui/script.js
index acdece29..ef95acb3 100644
--- a/static/webui/script.js
+++ b/static/webui/script.js
@@ -2205,18 +2205,13 @@ function doAcquireModularEquipment(category, WeaponType) {
if (mainInput) {
mainInput.value = "";
if (category === "MoaPets") {
- const modularFieldsMoa = document.getElementById("modular-MoaPets-Moa");
- const modularFieldsZanuka = document.getElementById("modular-MoaPets-Zanuka");
- modularFieldsZanuka.style.display = "none";
- modularFieldsMoa.style.display = "none";
+ document.getElementById("modular-MoaPets-Zanuka").classList.add("d-none");
+ document.getElementById("modular-MoaPets-Moa").classList.add("d-none");
} else if (category === "KubrowPets") {
- const modularFieldsCatbrow = document.getElementById("modular-KubrowPets-Catbrow");
- const modularFieldsKubrow = document.getElementById("modular-KubrowPets-Kubrow");
- modularFieldsCatbrow.style.display = "none";
- modularFieldsKubrow.style.display = "none";
+ document.getElementById("modular-KubrowPets-Catbrow").classList.add("d-none");
+ document.getElementById("modular-KubrowPets-Kubrow").classList.add("d-none");
} else {
- const modularFields = document.getElementById("modular-" + category);
- modularFields.style.display = "none";
+ document.getElementById("modular-" + category).classList.add("d-none");
}
}
requiredParts.forEach(part => {
@@ -3481,35 +3476,35 @@ function handleModularSelection(category) {
if (webUiModularWeapons.includes(key)) {
if (inventoryCategory === "MoaPets") {
if (key === "/Lotus/Types/Friendly/Pets/ZanukaPets/ZanukaPetPowerSuit") {
- modularFieldsMoa.style.display = "none";
- modularFieldsZanuka.style.display = "";
+ modularFieldsMoa.classList.add("d-none");
+ modularFieldsZanuka.classList.remove("d-none");
} else if (key === "/Lotus/Types/Friendly/Pets/MoaPets/MoaPetPowerSuit") {
- modularFieldsMoa.style.display = "";
- modularFieldsZanuka.style.display = "none";
+ modularFieldsMoa.classList.remove("d-none");
+ modularFieldsZanuka.classList.add("d-none");
}
} else if (inventoryCategory === "KubrowPets") {
if (key.endsWith("InfestedCatbrowPetPowerSuit")) {
- modularFieldsCatbrow.style.display = "";
- modularFieldsKubrow.style.display = "none";
+ modularFieldsCatbrow.classList.remove("d-none");
+ modularFieldsKubrow.classList.add("d-none");
} else if (key.endsWith("PredatorKubrowPetPowerSuit")) {
- modularFieldsCatbrow.style.display = "none";
- modularFieldsKubrow.style.display = "";
+ modularFieldsCatbrow.classList.add("d-none");
+ modularFieldsKubrow.classList.remove("d-none");
} else {
- modularFieldsCatbrow.style.display = "none";
- modularFieldsKubrow.style.display = "none";
+ modularFieldsCatbrow.classList.add("d-none");
+ modularFieldsKubrow.classList.add("d-none");
}
} else {
- modularFields.style.display = "";
+ modularFields.classList.remove("d-none");
}
} else {
if (inventoryCategory === "MoaPets") {
- modularFieldsZanuka.style.display = "none";
- modularFieldsMoa.style.display = "none";
+ modularFieldsMoa.classList.add("d-none");
+ modularFieldsZanuka.classList.add("d-none");
} else if (inventoryCategory === "KubrowPets") {
- modularFieldsCatbrow.style.display = "none";
- modularFieldsKubrow.style.display = "none";
+ modularFieldsCatbrow.classList.add("d-none");
+ modularFieldsKubrow.classList.add("d-none");
} else {
- modularFields.style.display = "none";
+ modularFields.classList.add("d-none");
}
}
});