From e11d6e20f4720dea4dd39aaa8109dad689bd40d2 Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Mon, 15 Sep 2025 18:46:54 +0200 Subject: [PATCH] chore(webui): exclude FlavourItems with `alwaysAvailable` --- package-lock.json | 8 ++++---- package.json | 2 +- .../custom/getItemListsController.ts | 10 ++++++---- static/webui/script.js | 18 +----------------- static/webui/translations/de.js | 3 --- static/webui/translations/en.js | 3 --- static/webui/translations/es.js | 3 --- static/webui/translations/fr.js | 3 --- static/webui/translations/ru.js | 3 --- static/webui/translations/uk.js | 3 --- static/webui/translations/zh.js | 3 --- 11 files changed, 12 insertions(+), 47 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7462d960..84daa390 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "morgan": "^1.10.0", "ncp": "^2.0.0", "undici": "^7.10.0", - "warframe-public-export-plus": "^0.5.88", + "warframe-public-export-plus": "^0.5.89", "warframe-riven-info": "^0.1.2", "winston": "^3.17.0", "winston-daily-rotate-file": "^5.0.0", @@ -5532,9 +5532,9 @@ } }, "node_modules/warframe-public-export-plus": { - "version": "0.5.88", - "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.88.tgz", - "integrity": "sha512-uX766+MYDY3pMncu/23Dp9VZvrUe8pdWRWMcxfUbXg29aYO2GqipimHaFtw+vfrY06YAE8nbFkCWhFL3oPDPGw==" + "version": "0.5.89", + "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.89.tgz", + "integrity": "sha512-a6dM1MirzofSsuv3LlRQHFLSSIGKPVSN93dcXSDmA3njsWqOGjJJdWyXqcyxxYw8rEB8CNowSHst/MUmKvKlRg==" }, "node_modules/warframe-riven-info": { "version": "0.1.2", diff --git a/package.json b/package.json index ee531756..fadc699f 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "morgan": "^1.10.0", "ncp": "^2.0.0", "undici": "^7.10.0", - "warframe-public-export-plus": "^0.5.88", + "warframe-public-export-plus": "^0.5.89", "warframe-riven-info": "^0.1.2", "winston": "^3.17.0", "winston-daily-rotate-file": "^5.0.0", diff --git a/src/controllers/custom/getItemListsController.ts b/src/controllers/custom/getItemListsController.ts index 3296ad1c..b2c118fa 100644 --- a/src/controllers/custom/getItemListsController.ts +++ b/src/controllers/custom/getItemListsController.ts @@ -447,10 +447,12 @@ const getItemListsController: RequestHandler = (req, response) => { } for (const [uniqueName, item] of Object.entries(ExportFlavour)) { - res.FlavourItems.push({ - uniqueName: uniqueName, - name: getString(item.name, lang) - }); + if (!item.alwaysAvailable) { + res.FlavourItems.push({ + uniqueName: uniqueName, + name: getString(item.name, lang) + }); + } } response.json(res); diff --git a/static/webui/script.js b/static/webui/script.js index bd0107c2..56dd0d0a 100644 --- a/static/webui/script.js +++ b/static/webui/script.js @@ -571,24 +571,8 @@ function fetchItemList() { document.getElementById("changeSyndicate").appendChild(option); }); } else if (type == "FlavourItems") { - const cursorPrefixes = { - Controller: loc("code_controller"), - MouseGrey: loc("code_mouse"), - MouseLine: loc("code_mouseLine"), - Mouse: loc("code_mouse") - }; items.forEach(item => { - if (item.uniqueName.startsWith("/Lotus/Interface/Graphics/CustomUI/Cursors/")) { - let base = item.uniqueName.replace("/Lotus/Interface/Graphics/CustomUI/Cursors/", ""); - for (const key in cursorPrefixes) { - if (base.startsWith(key)) { - const prefix = cursorPrefixes[key]; - const suffix = base.slice(key.length); - item.name = prefix + " " + suffix; - break; - } - } - } else if (item.uniqueName.includes("ColourPicker")) { + if (item.uniqueName.includes("ColourPicker")) { item.name = loc("code_itemColorPalette").split("|ITEM|").join(item.name); } const option = document.createElement("option"); diff --git a/static/webui/translations/de.js b/static/webui/translations/de.js index 6d65f15d..e9565173 100644 --- a/static/webui/translations/de.js +++ b/static/webui/translations/de.js @@ -64,9 +64,6 @@ dict = { code_completed: `Abgeschlossen`, code_active: `Aktiv`, code_pigment: `Pigment`, - code_controller: `[UNTRANSLATED] Controller cursor`, - code_mouseLine: `[UNTRANSLATED] Line cursor`, - code_mouse: `[UNTRANSLATED] Cursor`, code_itemColorPalette: `|ITEM| Farbpalette`, code_mature: `Für den Kampf auswachsen lassen`, code_unmature: `Genetisches Altern zurücksetzen`, diff --git a/static/webui/translations/en.js b/static/webui/translations/en.js index f9e42b8f..0ec8d056 100644 --- a/static/webui/translations/en.js +++ b/static/webui/translations/en.js @@ -63,9 +63,6 @@ dict = { code_completed: `Completed`, code_active: `Active`, code_pigment: `Pigment`, - code_controller: `Controller cursor`, - code_mouseLine: `Line cursor`, - code_mouse: `Cursor`, code_itemColorPalette: `|ITEM| Color Palette`, code_mature: `Mature for combat`, code_unmature: `Regress genetic aging`, diff --git a/static/webui/translations/es.js b/static/webui/translations/es.js index c21ab29a..291f6be2 100644 --- a/static/webui/translations/es.js +++ b/static/webui/translations/es.js @@ -64,9 +64,6 @@ dict = { code_completed: `Completada`, code_active: `Activa`, code_pigment: `Pigmento`, - code_controller: `[UNTRANSLATED] Controller cursor`, - code_mouseLine: `[UNTRANSLATED] Line cursor`, - code_mouse: `[UNTRANSLATED] Cursor`, code_itemColorPalette: `Paleta de colores |ITEM|`, code_mature: `Listo para el combate`, code_unmature: `Regresar el envejecimiento genético`, diff --git a/static/webui/translations/fr.js b/static/webui/translations/fr.js index ec4fae6f..519f49e7 100644 --- a/static/webui/translations/fr.js +++ b/static/webui/translations/fr.js @@ -64,9 +64,6 @@ dict = { code_completed: `Complétée`, code_active: `Active`, code_pigment: `Pigment`, - code_controller: `[UNTRANSLATED] Controller cursor`, - code_mouseLine: `[UNTRANSLATED] Line cursor`, - code_mouse: `[UNTRANSLATED] Cursor`, code_itemColorPalette: `Palette de couleurs |ITEM|`, code_mature: `Maturer pour le combat`, code_unmature: `Régrésser l'âge génétique`, diff --git a/static/webui/translations/ru.js b/static/webui/translations/ru.js index 6aae5bac..421cc9d1 100644 --- a/static/webui/translations/ru.js +++ b/static/webui/translations/ru.js @@ -64,9 +64,6 @@ dict = { code_completed: `Завершено`, code_active: `Активный`, code_pigment: `Пигмент`, - code_controller: `Курсор контроллера`, - code_mouseLine: `Линейный курсор`, - code_mouse: `Курсор`, code_itemColorPalette: `Цветовая палитра: |ITEM|`, code_mature: `Подготовить к сражениям`, code_unmature: `Регрессия генетического старения`, diff --git a/static/webui/translations/uk.js b/static/webui/translations/uk.js index de48e9b1..67892036 100644 --- a/static/webui/translations/uk.js +++ b/static/webui/translations/uk.js @@ -64,9 +64,6 @@ dict = { code_completed: `Завершено`, code_active: `Активний`, code_pigment: `Барвник`, - code_controller: `[UNTRANSLATED] Controller cursor`, - code_mouseLine: `[UNTRANSLATED] Line cursor`, - code_mouse: `[UNTRANSLATED] Cursor`, code_itemColorPalette: `Палітра кольорів «|ITEM|»`, code_mature: `Виростити для бою`, code_unmature: `Обернути старіння`, diff --git a/static/webui/translations/zh.js b/static/webui/translations/zh.js index 3b20fded..e2eb06b6 100644 --- a/static/webui/translations/zh.js +++ b/static/webui/translations/zh.js @@ -64,9 +64,6 @@ dict = { code_completed: `已完成`, code_active: `正在执行`, code_pigment: `颜料`, - code_controller: `[UNTRANSLATED] Controller cursor`, - code_mouseLine: `[UNTRANSLATED] Line cursor`, - code_mouse: `[UNTRANSLATED] Cursor`, code_itemColorPalette: `|ITEM| 调色盘`, code_mature: `成长并战备`, code_unmature: `逆转衰老基因`,