From 824b92c8c22aa670600dfa0b1f0bc884e524ac05 Mon Sep 17 00:00:00 2001
From: Sainan <63328889+Sainan@users.noreply.github.com>
Date: Tue, 1 Jul 2025 22:53:07 +0200
Subject: [PATCH] chore(webui): move max rank button before detailed view link
---
static/webui/script.js | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/static/webui/script.js b/static/webui/script.js
index 34b39060..9755f08e 100644
--- a/static/webui/script.js
+++ b/static/webui/script.js
@@ -651,6 +651,7 @@ function updateInventory() {
{
const td = document.createElement("td");
td.classList = "text-end text-nowrap";
+
let maxXP = Math.pow(uniqueLevelCaps[item.ItemType] ?? 30, 2) * 1000;
if (
category != "Suits" &&
@@ -663,7 +664,6 @@ function updateInventory() {
) {
maxXP /= 2;
}
-
let anyExaltedMissingXP = false;
if (item.XP >= maxXP && item.ItemType in itemMap && "exalted" in itemMap[item.ItemType]) {
for (const exaltedType of itemMap[item.ItemType].exalted) {
@@ -677,13 +677,6 @@ function updateInventory() {
}
}
}
-
- if (["Suits", "LongGuns", "Pistols", "Melee", "SpaceGuns", "SpaceMelee"].includes(category)) {
- const a = document.createElement("a");
- a.href = "/webui/detailedView?productCategory=" + category + "&itemId=" + item.ItemId.$oid;
- a.innerHTML = ``;
- td.appendChild(a);
- }
if (item.XP < maxXP || anyExaltedMissingXP) {
const a = document.createElement("a");
a.href = "#";
@@ -721,6 +714,14 @@ function updateInventory() {
a.innerHTML = ``;
td.appendChild(a);
}
+
+ if (["Suits", "LongGuns", "Pistols", "Melee", "SpaceGuns", "SpaceMelee"].includes(category)) {
+ const a = document.createElement("a");
+ a.href = "/webui/detailedView?productCategory=" + category + "&itemId=" + item.ItemId.$oid;
+ a.innerHTML = ``;
+ td.appendChild(a);
+ }
+
if (!(item.Features & 8) && modularWeapons.includes(item.ItemType)) {
const a = document.createElement("a");
a.href = "#";