mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-17 10:53:57 +01:00
start of equipment ui
This commit is contained in:
1 parent
c45af8e156
commit
30fa18f0fd
12 files changed
+90
-19
No files matched your search
@@ -16,7 +16,8 @@
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
svg {
|
||||
svg,
|
||||
img {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
aspect-ratio: 1 / 1;
|
||||
|
||||
font-size: var(--font-size-regular);
|
||||
font-size: var(--font-size-major);
|
||||
}
|
||||
@@ -9,6 +9,38 @@
|
||||
gap: var(--space-3);
|
||||
}
|
||||
|
||||
.equipment {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-3);
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
gap: var(--space-3);
|
||||
|
||||
.slots {
|
||||
display: flex;
|
||||
|
||||
.slot {
|
||||
aspect-ratio: 1 / 1;
|
||||
padding: var(--space-3);
|
||||
|
||||
font-size: var(--space-5);
|
||||
|
||||
&:first-child {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.lines {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -4,12 +4,15 @@ import type { StandardPrice } from "@protos/blitz_static_standard_price";
|
||||
import type { UpgradeLine } from "@protos/blitz_static_tank_upgrade_line";
|
||||
import type { StageParameters } from "@protos/blitz_static_tank_upgrade_single_stage";
|
||||
import { DoubleArrowDownIcon, DoubleArrowUpIcon } from "@radix-ui/react-icons";
|
||||
import { chunk } from "lodash-es";
|
||||
import { useMemo } from "react";
|
||||
import { equipmentColumns } from "../../config/equipment";
|
||||
import { catImages } from "../../config/images";
|
||||
import {
|
||||
alternativeLines,
|
||||
isAlternativeLine,
|
||||
originalLineName,
|
||||
} from "../../config/alternativeLines";
|
||||
} from "../../config/modules";
|
||||
import { useEquipment } from "../../hooks/useEquipment";
|
||||
import { useProtagonist } from "../../hooks/useProtagonist";
|
||||
import { useStrings } from "../../hooks/useStrings";
|
||||
@@ -39,12 +42,41 @@ function Equipment() {
|
||||
tank.tank!.equipment_preset_catalog_id,
|
||||
tank.tank!.equipment_price_preset_catalog_id,
|
||||
);
|
||||
const equipmentState = Tankopedia.use((state) => state.protagonist.equipment);
|
||||
|
||||
return (
|
||||
<div className={styles.section}>
|
||||
<div className={styles.header}>
|
||||
<Heading size="4">{strings.tanks.loadout.equipment}</Heading>
|
||||
</div>
|
||||
|
||||
<div className={styles.equipment}>
|
||||
{chunk(equipment.preset.slots, equipmentColumns).map((chunk, index) => {
|
||||
return (
|
||||
<div key={index} className={styles.row}>
|
||||
{chunk.map((slot, index) => {
|
||||
return (
|
||||
<div key={index} className={styles.slots}>
|
||||
{slot.options_catalog_i_ds.map((id) => {
|
||||
return (
|
||||
<Button
|
||||
color="gray"
|
||||
variant="soft"
|
||||
radius="1"
|
||||
key={id}
|
||||
className={styles.slot}
|
||||
>
|
||||
<img src={catImages.squareTransparent} />
|
||||
</Button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user