diff --git a/static/webui/script.js b/static/webui/script.js
index 6feb4020..cd970901 100644
--- a/static/webui/script.js
+++ b/static/webui/script.js
@@ -649,6 +649,14 @@ function updateInventory() {
];
// Populate inventory route
+
+ document.getElementById("typeName-tab").classList.remove("active");
+ document.getElementById("typeName").classList.remove("active", "show");
+ document.getElementById("itemType-type").value = "";
+
+ document.getElementById("miscItems-tab").classList.add("active");
+ document.getElementById("miscItems").classList.add("active", "show");
+
["RegularCredits", "PremiumCredits", "FusionPoints", "PrimeTokens"].forEach(currency => {
document.getElementById(currency + "-owned").textContent = loc("currency_owned")
.split("|COUNT|")
@@ -1685,7 +1693,7 @@ function doAcquireEvolution() {
setEvolutionProgress([{ ItemType: uniqueName, Rank: permanentEvolutionWeapons.has(uniqueName) ? 0 : 1 }]);
}
-$(document).on("input", "input[list]", function () {
+$(document).on("input", "input", function () {
$(this).removeClass("is-invalid");
});
@@ -2008,6 +2016,34 @@ function doAcquireMiscItems() {
}
}
+function addItemByItemType() {
+ const ItemType = document.getElementById("itemType-type").value;
+ if (!ItemType || !/^[A-Za-z/]+$/.test(ItemType) || !ItemType.startsWith("/Lotus/")) {
+ $("#itemType-type").addClass("is-invalid").focus();
+ return;
+ }
+ revalidateAuthz().then(() => {
+ $.post({
+ url: "/custom/addItems?" + window.authz,
+ contentType: "application/json",
+ data: JSON.stringify([
+ {
+ ItemType,
+ ItemCount: 1
+ }
+ ])
+ })
+ .done(function (_, _, jqXHR) {
+ if (jqXHR.status === 200) {
+ updateInventory();
+ }
+ })
+ .fail(function () {
+ $("#itemType-type").addClass("is-invalid").focus();
+ });
+ });
+}
+
function doAcquireRiven() {
let fingerprint;
try {
@@ -2070,10 +2106,6 @@ function doAcquireRiven() {
});
}
-$("#addriven-fingerprint").on("input", () => {
- $("#addriven-fingerprint").removeClass("is-invalid");
-});
-
function setFingerprint(ItemType, ItemId, fingerprint) {
revalidateAuthz().then(() => {
$.post({
diff --git a/static/webui/translations/de.js b/static/webui/translations/de.js
index 42637903..f2996d58 100644
--- a/static/webui/translations/de.js
+++ b/static/webui/translations/de.js
@@ -382,5 +382,9 @@ dict = {
theme_dark: `Dunkles Design`,
theme_light: `Helles Design`,
+ addMiscItems_label: `[UNTRANSLATED] Add by Name`,
+ addItemByItemType_label: `[UNTRANSLATED] Add By ItemType`,
+ addItemByItemType_warning: `[UNTRANSLATED] Use this feature at your own risk. It may break your inventory, and you will need to remove items manually if something goes wrong.`,
+
prettier_sucks_ass: ``
};
diff --git a/static/webui/translations/en.js b/static/webui/translations/en.js
index 76fbfd3b..295dca1f 100644
--- a/static/webui/translations/en.js
+++ b/static/webui/translations/en.js
@@ -381,5 +381,9 @@ dict = {
theme_dark: `Dark Theme`,
theme_light: `Light Theme`,
+ addMiscItems_label: `Add by Name`,
+ addItemByItemType_label: `Add By ItemType`,
+ addItemByItemType_warning: `Use this feature at your own risk. It may break your inventory, and you will need to remove items manually if something goes wrong.`,
+
prettier_sucks_ass: ``
};
diff --git a/static/webui/translations/es.js b/static/webui/translations/es.js
index e5ddb59d..3ebc1f97 100644
--- a/static/webui/translations/es.js
+++ b/static/webui/translations/es.js
@@ -382,5 +382,9 @@ dict = {
theme_dark: `Tema Oscuro`,
theme_light: `Tema Claro`,
+ addMiscItems_label: `[UNTRANSLATED] Add by Name`,
+ addItemByItemType_label: `[UNTRANSLATED] Add By ItemType`,
+ addItemByItemType_warning: `[UNTRANSLATED] Use this feature at your own risk. It may break your inventory, and you will need to remove items manually if something goes wrong.`,
+
prettier_sucks_ass: ``
};
diff --git a/static/webui/translations/fr.js b/static/webui/translations/fr.js
index 2c802a8d..4547c0ce 100644
--- a/static/webui/translations/fr.js
+++ b/static/webui/translations/fr.js
@@ -382,5 +382,9 @@ dict = {
theme_dark: `Thème sombre`,
theme_light: `Thème clair`,
+ addMiscItems_label: `[UNTRANSLATED] Add by Name`,
+ addItemByItemType_label: `[UNTRANSLATED] Add By ItemType`,
+ addItemByItemType_warning: `[UNTRANSLATED] Use this feature at your own risk. It may break your inventory, and you will need to remove items manually if something goes wrong.`,
+
prettier_sucks_ass: ``
};
diff --git a/static/webui/translations/ru.js b/static/webui/translations/ru.js
index 961d63ab..f9b6e54f 100644
--- a/static/webui/translations/ru.js
+++ b/static/webui/translations/ru.js
@@ -382,5 +382,9 @@ dict = {
theme_dark: `Темная тема`,
theme_light: `Светлая тема`,
+ addMiscItems_label: `По имени`,
+ addItemByItemType_label: `По ItemType`,
+ addItemByItemType_warning: `Используйте эту функцию на свой страх и риск. Она может повредить ваш инвентарь, и в случае проблем вам придётся удалять предметы вручную.`,
+
prettier_sucks_ass: ``
};
diff --git a/static/webui/translations/uk.js b/static/webui/translations/uk.js
index d820559c..7c9f38ce 100644
--- a/static/webui/translations/uk.js
+++ b/static/webui/translations/uk.js
@@ -382,5 +382,9 @@ dict = {
theme_dark: `Темна тема`,
theme_light: `Світла тема`,
+ addMiscItems_label: `[UNTRANSLATED] Add by Name`,
+ addItemByItemType_label: `[UNTRANSLATED] Add By ItemType`,
+ addItemByItemType_warning: `[UNTRANSLATED] Use this feature at your own risk. It may break your inventory, and you will need to remove items manually if something goes wrong.`,
+
prettier_sucks_ass: ``
};
diff --git a/static/webui/translations/zh.js b/static/webui/translations/zh.js
index bc199a17..d66a0162 100644
--- a/static/webui/translations/zh.js
+++ b/static/webui/translations/zh.js
@@ -382,5 +382,9 @@ dict = {
theme_dark: `暗色主题`,
theme_light: `亮色主题`,
+ addMiscItems_label: `[UNTRANSLATED] Add by Name`,
+ addItemByItemType_label: `[UNTRANSLATED] Add By ItemType`,
+ addItemByItemType_warning: `[UNTRANSLATED] Use this feature at your own risk. It may break your inventory, and you will need to remove items manually if something goes wrong.`,
+
prettier_sucks_ass: ``
};
--
2.47.2
From dad479fac80081529629998a33e763e1ec84e441 Mon Sep 17 00:00:00 2001
From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
Date: Wed, 27 Aug 2025 04:54:17 +0200
Subject: [PATCH 2/7] lint fix
---
src/services/inventoryService.ts | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/services/inventoryService.ts b/src/services/inventoryService.ts
index 1ecae8a8..ddd855ca 100644
--- a/src/services/inventoryService.ts
+++ b/src/services/inventoryService.ts
@@ -874,9 +874,9 @@ export const addItem = async (
break;
}
break;
- case "Weapons":
+ case "Weapons": {
if (typeName.substr(1).split("/")[4] == "MeleeTrees") break;
- let productCategory = typeName.substr(1).split("/")[3];
+ const productCategory = typeName.substr(1).split("/")[3];
switch (productCategory) {
case "Pistols":
case "LongGuns":
@@ -893,6 +893,7 @@ export const addItem = async (
}
}
break;
+ }
}
throw new Error(`unable to add item: ${typeName}`);
};
--
2.47.2
From acf3b811cf03a34cedd18864df341b8742299568 Mon Sep 17 00:00:00 2001
From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
Date: Wed, 27 Aug 2025 04:57:46 +0200
Subject: [PATCH 3/7] Update script.js
---
static/webui/script.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/static/webui/script.js b/static/webui/script.js
index cd970901..2a5ee993 100644
--- a/static/webui/script.js
+++ b/static/webui/script.js
@@ -2106,6 +2106,10 @@ function doAcquireRiven() {
});
}
+$("#addriven-fingerprint").on("input", () => {
+ $("#addriven-fingerprint").removeClass("is-invalid");
+});
+
function setFingerprint(ItemType, ItemId, fingerprint) {
revalidateAuthz().then(() => {
$.post({
--
2.47.2
From 65b8211aeb0f199e8c7ec145d120fba86e894d78 Mon Sep 17 00:00:00 2001
From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
Date: Sat, 30 Aug 2025 03:45:28 +0200
Subject: [PATCH 4/7] put tab navs into card header
---
static/webui/index.html | 25 +++++++++++++------------
static/webui/script.js | 12 ++++++------
static/webui/translations/de.js | 8 +++-----
static/webui/translations/en.js | 8 +++-----
static/webui/translations/es.js | 8 +++-----
static/webui/translations/fr.js | 8 +++-----
static/webui/translations/ru.js | 8 +++-----
static/webui/translations/uk.js | 8 +++-----
static/webui/translations/zh.js | 8 +++-----
9 files changed, 40 insertions(+), 53 deletions(-)
diff --git a/static/webui/index.html b/static/webui/index.html
index 23e564f1..32e0586e 100644
--- a/static/webui/index.html
+++ b/static/webui/index.html
@@ -92,29 +92,30 @@