feat(webui): edit suit invigorations #2478
@ -14,7 +14,6 @@ import { addMissingMaxRankModsController } from "@/src/controllers/custom/addMis
|
||||
import { webuiFileChangeDetectedController } from "@/src/controllers/custom/webuiFileChangeDetectedController";
|
||||
import { completeAllMissionsController } from "@/src/controllers/custom/completeAllMissionsController";
|
||||
import { addMissingHelminthBlueprintsController } from "@/src/controllers/custom/addMissingHelminthBlueprintsController";
|
||||
import { editSuitInvigorationUpgradeController } from "@/src/controllers/custom/editSuitInvigorationUpgradeController";
|
||||
|
||||
import { createAccountController } from "@/src/controllers/custom/createAccountController";
|
||||
import { createMessageController } from "@/src/controllers/custom/createMessageController";
|
||||
@ -27,6 +26,7 @@ import { setEvolutionProgressController } from "@/src/controllers/custom/setEvol
|
||||
import { setBoosterController } from "@/src/controllers/custom/setBoosterController";
|
||||
import { updateFingerprintController } from "@/src/controllers/custom/updateFingerprintController";
|
||||
import { changeModularPartsController } from "@/src/controllers/custom/changeModularPartsController";
|
||||
import { editSuitInvigorationUpgradeController } from "@/src/controllers/custom/editSuitInvigorationUpgradeController";
|
||||
|
||||
import { getConfigController, setConfigController } from "@/src/controllers/custom/configController";
|
||||
|
||||
@ -46,7 +46,6 @@ customRouter.get("/addMissingMaxRankMods", addMissingMaxRankModsController);
|
||||
customRouter.get("/webuiFileChangeDetected", webuiFileChangeDetectedController);
|
||||
customRouter.get("/completeAllMissions", completeAllMissionsController);
|
||||
customRouter.get("/addMissingHelminthBlueprints", addMissingHelminthBlueprintsController);
|
||||
customRouter.post("/editSuitInvigorationUpgrade", editSuitInvigorationUpgradeController);
|
||||
|
||||
Sainan marked this conversation as resolved
Outdated
|
||||
customRouter.post("/createAccount", createAccountController);
|
||||
customRouter.post("/createMessage", createMessageController);
|
||||
@ -59,6 +58,7 @@ customRouter.post("/setEvolutionProgress", setEvolutionProgressController);
|
||||
customRouter.post("/setBooster", setBoosterController);
|
||||
customRouter.post("/updateFingerprint", updateFingerprintController);
|
||||
customRouter.post("/changeModularParts", changeModularPartsController);
|
||||
customRouter.post("/editSuitInvigorationUpgrade", editSuitInvigorationUpgradeController);
|
||||
|
||||
customRouter.post("/getConfig", getConfigController);
|
||||
customRouter.post("/setConfig", setConfigController);
|
||||
|
@ -455,6 +455,62 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="editSuitInvigoration" class="modal-overlay" style="display: none;">
|
||||
<div id="editSuitInvigorationOverlay" class="modal-overlay" onclick="hideSuitInvigorationForm()"></div>
|
||||
<div id="editSuitInvigorationForm" class="card modal-form">
|
||||
<h5 class="card-header">Edit Suit Invigoration Upgrades</h5>
|
||||
<div class="card-body">
|
||||
<form onsubmit="submitSuitInvigorationUpgrade(event)">
|
||||
<input type="hidden" id="invigoration-oid" />
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="invigoration-offensive" class="form-label">Offensive Upgrade</label>
|
||||
<select class="form-select" id="invigoration-offensive">
|
||||
<option value="">None</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Offensive/OffensiveInvigorationPowerStrength">Power Strength</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Offensive/OffensiveInvigorationPowerRange">Power Range</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Offensive/OffensiveInvigorationPowerDuration">Power Duration</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Offensive/OffensiveInvigorationMeleeDamage">Melee Damage</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Offensive/OffensiveInvigorationPrimaryDamage">Primary Damage</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Offensive/OffensiveInvigorationSecondaryDamage">Secondary Damage</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Offensive/OffensiveInvigorationPrimaryCritChance">Primary Crit Chance</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Offensive/OffensiveInvigorationSecondaryCritChance">Secondary Crit Chance</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Offensive/OffensiveInvigorationMeleeCritChance">Melee Crit Chance</option>
|
||||
</select>
|
||||
Sainan marked this conversation as resolved
Outdated
Sainan
commented
Why is this inside of the archon crystals card and not its own card? Why is this inside of the archon crystals card and not its own card?
nyaoouo
commented
Because I didn't realize that you used path route first and then only controlled visibility based on url params... Because I didn't realize that you used path route first and then only controlled visibility based on url params...
|
||||
</div>
|
||||
Sainan marked this conversation as resolved
Outdated
Sainan
commented
The oid is already in the query string. Be consistent. The oid is already in the query string. Be consistent.
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="invigoration-defensive" class="form-label">Defensive Upgrade</label>
|
||||
Sainan marked this conversation as resolved
Sainan
commented
All your strings should be added to the translation system. And let's not lowercase a title? 😒 All your strings should be added to the translation system. And let's not lowercase a title? 😒
nyaoouo
commented
because i just use my mobile phone to edit it =_=... because i just use my mobile phone to edit it =_=...
Sainan
commented
Try coding on a PC. :) Try coding on a PC. :)
|
||||
<select class="form-select" id="invigoration-defensive">
|
||||
<option value="">None</option>
|
||||
Sainan marked this conversation as resolved
Sainan
commented
There are a few more strings here... There are a few more strings here...
nyaoouo
commented
I don't know the exact translation of the attributes, so I'll just estimate it based on the key. I don't know the exact translation of the attributes, so I'll just estimate it based on the key.
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationPowerEfficiency">Power Efficiency</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationMovementSpeed">Movement Speed</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationParkourSpeed">Parkour Speed</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationHealth">Health</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationEnergy">Energy</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationStatusResistance">Status Resistance</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationReloadSpeed">Reload Speed</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationHealthRegen">Health Regen</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationArmor">Armor</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationJumps">Jumps</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationEnergyRegen">Energy Regen</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="invigoration-expiry" class="form-label">Upgrades Expiry (optional)</label>
|
||||
<input type="datetime-local" class="form-control" id="invigoration-expiry" />
|
||||
</div>
|
||||
|
||||
<div class="d-flex gap-2">
|
||||
<button type="submit" class="btn btn-primary">Apply Upgrades</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="hideSuitInvigorationForm()">Cancel</button>
|
||||
<button type="button" class="btn btn-danger" onclick="clearSuitInvigorationUpgrades()">Clear Upgrades</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="detailedView-route" data-route="/webui/detailedView" data-title="Inventory | OpenWF WebUI">
|
||||
<h3 id="detailedView-loading" class="mb-0" data-loc="general_loading"></h3>
|
||||
@ -977,59 +1033,6 @@
|
||||
</div>
|
||||
<div class="toast-container position-fixed bottom-0 end-0 p-3"></div>
|
||||
</div>
|
||||
<div id="editSuitInvigorationForm" class="card" style="display: none;">
|
||||
<h5 class="card-header">Edit Suit Invigoration Upgrades</h5>
|
||||
<div class="card-body">
|
||||
<form onsubmit="submitSuitInvigorationUpgrade(event)">
|
||||
<input type="hidden" id="invigoration-oid" />
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="invigoration-offensive" class="form-label">Offensive Upgrade</label>
|
||||
<select class="form-select" id="invigoration-offensive">
|
||||
<option value="">None</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Offensive/OffensiveInvigorationPowerStrength">Power Strength</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Offensive/OffensiveInvigorationPowerRange">Power Range</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Offensive/OffensiveInvigorationPowerDuration">Power Duration</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Offensive/OffensiveInvigorationMeleeDamage">Melee Damage</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Offensive/OffensiveInvigorationPrimaryDamage">Primary Damage</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Offensive/OffensiveInvigorationSecondaryDamage">Secondary Damage</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Offensive/OffensiveInvigorationPrimaryCritChance">Primary Crit Chance</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Offensive/OffensiveInvigorationSecondaryCritChance">Secondary Crit Chance</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Offensive/OffensiveInvigorationMeleeCritChance">Melee Crit Chance</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="invigoration-defensive" class="form-label">Defensive Upgrade</label>
|
||||
<select class="form-select" id="invigoration-defensive">
|
||||
<option value="">None</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationPowerEfficiency">Power Efficiency</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationMovementSpeed">Movement Speed</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationParkourSpeed">Parkour Speed</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationHealth">Health</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationEnergy">Energy</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationStatusResistance">Status Resistance</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationReloadSpeed">Reload Speed</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationHealthRegen">Health Regen</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationArmor">Armor</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationJumps">Jumps</option>
|
||||
<option value="/Lotus/Upgrades/Invigorations/Utility/UtilityInvigorationEnergyRegen">Energy Regen</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="invigoration-expiry" class="form-label">Upgrades Expiry (optional)</label>
|
||||
<input type="datetime-local" class="form-control" id="invigoration-expiry" />
|
||||
</div>
|
||||
|
||||
<div class="d-flex gap-2">
|
||||
<button type="submit" class="btn btn-primary">Apply Upgrades</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="hideSuitInvigorationForm()">Cancel</button>
|
||||
<button type="button" class="btn btn-danger" onclick="clearSuitInvigorationUpgrades()">Clear Upgrades</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<datalist id="datalist-Suits"></datalist>
|
||||
<datalist id="datalist-SpaceSuits"></datalist>
|
||||
<datalist id="datalist-LongGuns"></datalist>
|
||||
|
@ -2915,35 +2915,11 @@ function showSuitInvigorationForm(suitData) {
|
||||
document.getElementById("invigoration-expiry").value = "";
|
||||
}
|
||||
|
||||
const form = document.getElementById("editSuitInvigorationForm");
|
||||
form.style.display = "block";
|
||||
form.style.position = "fixed";
|
||||
form.style.top = "50%";
|
||||
form.style.left = "50%";
|
||||
form.style.transform = "translate(-50%, -50%)";
|
||||
form.style.zIndex = "1050";
|
||||
form.style.width = "400px";
|
||||
|
||||
// Add backdrop
|
||||
const backdrop = document.createElement("div");
|
||||
backdrop.id = "invigoration-backdrop";
|
||||
backdrop.style.position = "fixed";
|
||||
backdrop.style.top = "0";
|
||||
backdrop.style.left = "0";
|
||||
backdrop.style.width = "100%";
|
||||
backdrop.style.height = "100%";
|
||||
backdrop.style.backgroundColor = "rgba(0, 0, 0, 0.5)";
|
||||
backdrop.style.zIndex = "1040";
|
||||
backdrop.onclick = hideSuitInvigorationForm;
|
||||
document.body.appendChild(backdrop);
|
||||
document.getElementById("editSuitInvigoration").style.display = "block";
|
||||
}
|
||||
|
||||
function hideSuitInvigorationForm() {
|
||||
document.getElementById("editSuitInvigorationForm").style.display = "none";
|
||||
const backdrop = document.getElementById("invigoration-backdrop");
|
||||
if (backdrop) {
|
||||
backdrop.remove();
|
||||
}
|
||||
document.getElementById("editSuitInvigoration").style.display = "none";
|
||||
}
|
||||
|
||||
function submitSuitInvigorationUpgrade(event) {
|
||||
Sainan marked this conversation as resolved
Outdated
Sainan
commented
If you need godawful custom CSS, put it in the CSS file. If you need godawful custom CSS, put it in the CSS file.
|
||||
|
@ -49,3 +49,22 @@ td.text-end > a > svg {
|
||||
padding-right: var(--bs-navbar-nav-link-padding-x);
|
||||
padding-left: var(--bs-navbar-nav-link-padding-x);
|
||||
}
|
||||
|
||||
/* Modal overlay and form styling */
|
||||
.modal-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
z-index: 1040;
|
||||
}
|
||||
.modal-form {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 1050;
|
||||
width: 400px;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user
Really? Don't see what's wrong here?