forked from OpenWF/SpaceNinjaServer
fix(webui): display correct name for kuva weapons in detailedView (#2952)
Reviewed-on: OpenWF/SpaceNinjaServer#2952 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
This commit is contained in:
parent
4bdb759463
commit
678ad0c4a1
@ -1542,14 +1542,17 @@ function updateInventory() {
|
|||||||
|
|
||||||
if (item) {
|
if (item) {
|
||||||
document.getElementById("detailedView-loading").classList.add("d-none");
|
document.getElementById("detailedView-loading").classList.add("d-none");
|
||||||
|
const itemName = itemMap[item.ItemType]?.name ?? item.ItemType;
|
||||||
if (item.ItemName) {
|
if (item.ItemName) {
|
||||||
$("#detailedView-title").text(item.ItemName);
|
const pipeIndex = item.ItemName.indexOf("|");
|
||||||
$("#detailedView-route .text-body-secondary").text(
|
if (pipeIndex != -1) {
|
||||||
itemMap[item.ItemType]?.name ?? item.ItemType
|
$("#detailedView-title").text(item.ItemName.substr(1 + pipeIndex) + " " + itemName);
|
||||||
);
|
} else {
|
||||||
|
$("#detailedView-title").text(item.ItemName);
|
||||||
|
$("#detailedView-route .text-body-secondary").text(itemName);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$("#detailedView-title").text(itemMap[item.ItemType]?.name ?? item.ItemType);
|
$("#detailedView-title").text(itemName);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (category == "Suits") {
|
if (category == "Suits") {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user