From 61450b04bb22c3396e37eb9506956113313b0fe9 Mon Sep 17 00:00:00 2001 From: Sainan Date: Thu, 9 May 2024 22:34:47 +0200 Subject: [PATCH] feat(webui): add "Add Items" to acquire various items (#209) Co-authored-by: Sainan --- .../custom/getItemListsController.ts | 5 +-- static/webui/index.html | 19 ++++++++--- static/webui/script.js | 33 +++++++++++++++---- 3 files changed, 44 insertions(+), 13 deletions(-) diff --git a/src/controllers/custom/getItemListsController.ts b/src/controllers/custom/getItemListsController.ts index ec768b83..5eeacdc9 100644 --- a/src/controllers/custom/getItemListsController.ts +++ b/src/controllers/custom/getItemListsController.ts @@ -1,5 +1,5 @@ import { RequestHandler } from "express"; -import { MinItem, warframes, weapons } from "@/src/services/itemDataService"; +import { MinItem, warframes, weapons, items } from "@/src/services/itemDataService"; interface ListedItem { uniqueName: string; @@ -18,7 +18,8 @@ function reduceItems(items: MinItem[]): ListedItem[] { const getItemListsController: RequestHandler = (_req, res) => { res.json({ warframes: reduceItems(warframes), - weapons: reduceItems(weapons.filter(item => item.productCategory != "OperatorAmps")) + weapons: reduceItems(weapons.filter(item => item.productCategory != "OperatorAmps")), + miscitems: reduceItems(items.filter(item => item.category == "Misc" || item.category == "Resources")) }); }; diff --git a/static/webui/index.html b/static/webui/index.html index 780792ec..d3770b59 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -26,35 +26,43 @@

Hello, ! Logout

-

+

Note: Changes made here will only be reflected in-game when the game re-downloads your inventory. Visiting the navigation should be the easiest way to trigger that.

+
+
Add Items
+
+ + + +
+
-
+
Warframes
- +
-
+
Weapons
- +
@@ -64,6 +72,7 @@
+