This commit is contained in:
SandPoot
2023-12-07 23:37:04 -03:00
parent d2039c33fe
commit 0d8739aebf

View File

@@ -103,8 +103,8 @@ export const BorgPanel = (props, context) => {
{upgrades.map(upgrade => {
if (!upgrade.module_type
|| (upgrade.module_type.includes(borg.active_module))) {
const installedCount =
active_upgrades.filter(installed_upgrade
const installedCount
= active_upgrades.filter(installed_upgrade
=> installed_upgrade.type === upgrade.type).length;
const isInstalled = installedCount > 0;
return (
@@ -123,7 +123,8 @@ export const BorgPanel = (props, context) => {
})} />
{
(!upgrade.denied_type || upgrade.maximum_of_type > 1)
&& upgrade.cost !== null ? (
&& upgrade.cost !== null
? (
<>
<Button
content={<Icon name="plus" />}
@@ -142,13 +143,15 @@ export const BorgPanel = (props, context) => {
})}
/>
</>
) : ""}
) : ""
}
</>
);
} })}
</LabeledList.Item>
{ka_remaining_capacity !== null &&
<LabeledList.Item label="Remaining ka capacity">
{
ka_remaining_capacity !== null
&& <LabeledList.Item label="Remaining ka capacity">
{ka_remaining_capacity}
</LabeledList.Item>
}