fix
All checks were successful
Build / build (pull_request) Successful in 1m35s

This commit is contained in:
AMelonInsideLemon 2025-06-29 00:03:56 +02:00
parent fd6b6ec9ab
commit bdd6de80f8
9 changed files with 27 additions and 27 deletions

View File

@ -7,21 +7,19 @@ export const updateFingerprintController: RequestHandler = async (req, res) => {
const accountId = await getAccountIdForRequest(req);
const request = req.body as IUpdateFingerPrintRequest;
const inventory = await getInventory(accountId, request.category);
if (inventory) {
const item = inventory[request.category].id(request.oid);
if (item) {
if (request.action == "set" && request.upgradeFingerprint.buffs[0].Tag) {
const newUpgradeFingerprint = request.upgradeFingerprint;
if (!newUpgradeFingerprint.compact) newUpgradeFingerprint.compact = item.ItemType;
const item = inventory[request.category].id(request.oid);
if (item) {
if (request.action == "set" && request.upgradeFingerprint.buffs[0].Tag) {
const newUpgradeFingerprint = request.upgradeFingerprint;
if (!newUpgradeFingerprint.compact) newUpgradeFingerprint.compact = item.ItemType;
item.UpgradeType = request.upgradeType;
item.UpgradeFingerprint = JSON.stringify(newUpgradeFingerprint);
} else if (request.action == "remove") {
item.UpgradeFingerprint = undefined;
item.UpgradeType = undefined;
}
await inventory.save();
item.UpgradeType = request.upgradeType;
item.UpgradeFingerprint = JSON.stringify(newUpgradeFingerprint);
} else if (request.action == "remove") {
item.UpgradeFingerprint = undefined;
item.UpgradeType = undefined;
}
await inventory.save();
}
res.end();
};

View File

@ -458,7 +458,7 @@
<div id="detailedView-route" data-route="/webui/detailedView" data-title="Inventory | OpenWF WebUI">
<h3 class="mb-0"></h3>
<p class="text-body-secondary"></p>
<div id="archonShards-card" class="card mb-3" style="display: none;">
<div id="archonShards-card" class="card mb-3 d-none">
<h5 class="card-header" data-loc="detailedView_archonShardsLabel"></h5>
<div class="card-body">
<p>
@ -476,7 +476,7 @@
</table>
</div>
</div>
<div id="valenceBonus-card" class="card mb-3" style="display: none;">
<div id="valenceBonus-card" class="card mb-3 d-none">
<h5 class="card-header" data-loc="detailedView_valenceBonusLabel"></h5>
<div class="card-body">
<p data-loc="detailedView_valenceBonusDescription"></p>

View File

@ -230,8 +230,6 @@ function setLanguage(lang) {
}
}
const urlParams = new URLSearchParams(window.location.search);
const webUiModularWeapons = [
"/Lotus/Weapons/Sentients/OperatorAmplifiers/OperatorAmpWeapon",
"/Lotus/Weapons/Ostron/Melee/LotusModularWeapon",
@ -1136,6 +1134,7 @@ function updateInventory() {
// Populate detailedView route
if (single.getCurrentPath().substr(0, 19) == "/webui/detailedView") {
const urlParams = new URLSearchParams(window.location.search);
const oid = urlParams.get("itemId");
const category = urlParams.get("productCategory");
const item = data[category].find(x => x.ItemId.$oid == oid);
@ -1152,7 +1151,7 @@ function updateInventory() {
}
if (category == "Suits") {
document.getElementById("archonShards-card").style.display = "";
document.getElementById("archonShards-card").classList.remove("d-none");
const uniqueUpgrades = {};
(item.ArchonCrystalUpgrades ?? []).forEach(upgrade => {
@ -1189,7 +1188,7 @@ function updateInventory() {
document.getElementById("crystals-list").appendChild(tr);
});
} else if (["LongGuns", "Pistols", "Melee", "SpaceGuns", "SpaceMelee"].includes(category)) {
document.getElementById("valenceBonus-card").style.display = "";
document.getElementById("valenceBonus-card").classList.remove("d-none");
document.getElementById("valenceBonus-innateDamage").value = "";
document.getElementById("valenceBonus-procent").value = 25;
@ -2141,14 +2140,15 @@ function doAddMissingMaxRankMods() {
single.getRoute("#detailedView-route").on("beforeload", function () {
this.element.querySelector("h3").textContent = "Loading...";
document.getElementById("archonShards-card").style.display = "none";
document.getElementById("valenceBonus-card").style.display = "none";
document.getElementById("archonShards-card").classList.add("d-none");
document.getElementById("valenceBonus-card").classList.add("d-none");
if (window.didInitialInventoryUpdate) {
updateInventory();
}
});
function doPushArchonCrystalUpgrade() {
const urlParams = new URLSearchParams(window.location.search);
const uniqueName = getKey(document.querySelector("[list='datalist-archonCrystalUpgrades']"));
if (!uniqueName) {
$("[list='datalist-archonCrystalUpgrades']").addClass("is-invalid").focus();
@ -2172,6 +2172,7 @@ function doPushArchonCrystalUpgrade() {
}
function doPopArchonCrystalUpgrade(type) {
const urlParams = new URLSearchParams(window.location.search);
revalidateAuthz().then(() => {
$.get(
"/custom/popArchonCrystalUpgrade?" + window.authz + "&oid=" + urlParams.get("itemId") + "&type=" + type
@ -2698,6 +2699,7 @@ function toUpdradeFingerPrintVaule(value, min) {
function handleValenceBonusChange(event) {
event.preventDefault();
const urlParams = new URLSearchParams(window.location.search);
const action = event.submitter.value;
const Tag = document.getElementById("valenceBonus-innateDamage").value;
const Value = toUpdradeFingerPrintVaule(document.getElementById("valenceBonus-procent").value / 100, 0.25);

View File

@ -120,7 +120,7 @@ dict = {
detailedView_archonShardsDescription: `Du kannst diese unbegrenzten Slots nutzen, um eine Vielzahl von Verbesserungen anzuwenden.`,
detailedView_archonShardsDescription2: `Hinweis: Jede Archon-Scherbe benötigt beim Laden etwas Zeit, um angewendet zu werden.`,
detailedView_valenceBonusLabel: `Valenz-Bonus`,
detailedView_valenceBonusDescription: `[UNTRANSLATED] You can add or remove the Valence Bonus from your weapon.`,
detailedView_valenceBonusDescription: `[UNTRANSLATED] You can set or remove the Valence Bonus from your weapon.`,
mods_addRiven: `Riven hinzufügen`,
mods_fingerprint: `Fingerabdruck`,

View File

@ -119,7 +119,7 @@ dict = {
detailedView_archonShardsDescription: `You can use these unlimited slots to apply a wide range of upgrades.`,
detailedView_archonShardsDescription2: `Note that each archon shard takes some time to be applied when loading in.`,
detailedView_valenceBonusLabel: `Valence Bonus`,
detailedView_valenceBonusDescription: `You can add or remove the Valence Bonus from your weapon.`,
detailedView_valenceBonusDescription: `You can set or remove the Valence Bonus from your weapon.`,
mods_addRiven: `Add Riven`,
mods_fingerprint: `Fingerprint`,

View File

@ -120,7 +120,7 @@ dict = {
detailedView_archonShardsDescription: `Puedes usar estas ranuras ilimitadas para aplicar una amplia variedad de mejoras`,
detailedView_archonShardsDescription2: `Ten en cuenta que cada fragmento de archón tarda un poco en aplicarse al cargar`,
detailedView_valenceBonusLabel: `Bônus de Valência`,
detailedView_valenceBonusDescription: `[UNTRANSLATED] You can add or remove the Valence Bonus from your weapon.`,
detailedView_valenceBonusDescription: `[UNTRANSLATED] You can set or remove the Valence Bonus from your weapon.`,
mods_addRiven: `Agregar Agrietado`,
mods_fingerprint: `Huella digital`,

View File

@ -120,7 +120,7 @@ dict = {
detailedView_archonShardsDescription: `Slots illimités pour appliquer plusieurs améliorations`,
detailedView_archonShardsDescription2: `Un délai sera présent entre l'application des éclats et le chargement en jeu.`,
detailedView_valenceBonusLabel: `Bonus de Valence`,
detailedView_valenceBonusDescription: `[UNTRANSLATED] You can add or remove the Valence Bonus from your weapon.`,
detailedView_valenceBonusDescription: `[UNTRANSLATED] You can set or remove the Valence Bonus from your weapon.`,
mods_addRiven: `Ajouter un riven`,
mods_fingerprint: `Empreinte`,

View File

@ -120,7 +120,7 @@ dict = {
detailedView_archonShardsDescription: `Вы можете использовать эти неограниченные ячейки для установки множества улучшений.`,
detailedView_archonShardsDescription2: `Обратите внимание: каждый фрагмент архонта применяется с задержкой при загрузке.`,
detailedView_valenceBonusLabel: `Бонус Валентности`,
detailedView_valenceBonusDescription: `Вы можете добавить или убрать бонус валентности с вашего оружия.`,
detailedView_valenceBonusDescription: `Вы можете установить или убрать бонус валентности с вашего оружия.`,
mods_addRiven: `Добавить Мод Разлома`,
mods_fingerprint: `Отпечаток`,

View File

@ -120,7 +120,7 @@ dict = {
detailedView_archonShardsDescription: `您可以使用这些无限插槽应用各种强化效果`,
detailedView_archonShardsDescription2: `请注意, 在加载时, 每个执政官源力石都需要一定的时间来生效。`,
detailedView_valenceBonusLabel: `效价加成`,
detailedView_valenceBonusDescription: `[UNTRANSLATED] You can add or remove the Valence Bonus from your weapon.`,
detailedView_valenceBonusDescription: `[UNTRANSLATED] You can set or remove the Valence Bonus from your weapon.`,
mods_addRiven: `添加裂罅MOD`,
mods_fingerprint: `印记`,