
{formatCompact(locale, value)}
diff --git a/packages/website-ue/src/components/TankopediaLoadout/index.module.css b/packages/website-ue/src/components/TankopediaLoadout/index.module.css
index 74e4b61a8..9276c3158 100644
--- a/packages/website-ue/src/components/TankopediaLoadout/index.module.css
+++ b/packages/website-ue/src/components/TankopediaLoadout/index.module.css
@@ -60,40 +60,57 @@
.line {
display: flex;
+ flex-direction: column;
gap: var(--space-3);
- .wrapper {
+ .line-wrap {
display: flex;
- flex-direction: column;
align-items: center;
- gap: var(--space-2);
- .stage {
- position: relative;
+ gap: var(--space-3);
- padding: var(--space-3);
+ .wrap-marker {
+ padding-bottom: var(--font-size-minor);
- font-size: 2em;
-
- .icon {
+ svg {
width: 1em;
height: 1em;
-
- transform: translate(var(--space-1), var(--space-1));
}
+ }
- .tier {
- position: absolute;
- left: var(--space-2);
- top: var(--space-2);
- }
+ .wrapper {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: var(--space-2);
- .price {
- position: absolute;
- left: 50%;
- bottom: var(--space-2);
- transform: translateX(-50%);
+ .stage {
+ position: relative;
+
+ padding: var(--space-3);
+
+ font-size: 2em;
+
+ .icon {
+ width: 1em;
+ height: 1em;
+
+ transform: translate(var(--space-1), var(--space-1));
+ }
+
+ .tier {
+ position: absolute;
+ left: var(--space-2);
+ top: var(--space-2);
+ }
+
+ .price {
+ position: absolute;
+ left: 50%;
+ bottom: var(--space-2);
+ transform: translateX(-50%);
+ }
}
}
}
diff --git a/packages/website-ue/src/components/TankopediaLoadout/index.tsx b/packages/website-ue/src/components/TankopediaLoadout/index.tsx
index 55083e4d3..adfbe6543 100644
--- a/packages/website-ue/src/components/TankopediaLoadout/index.tsx
+++ b/packages/website-ue/src/components/TankopediaLoadout/index.tsx
@@ -1,10 +1,14 @@
import { romanize } from "@blitzkit/core";
import type { BlitzStaticEquipmentPresetComponent_EquipmentSlot } from "@protos/blitz_static_equipment_preset_component";
import { Grade } from "@protos/blitz_static_standard_grades_enum";
-import type { StandardPrice } from "@protos/blitz_static_standard_price";
+import { 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 {
+ CornerBottomLeftIcon,
+ DoubleArrowLeftIcon,
+ DoubleArrowRightIcon,
+} from "@radix-ui/react-icons";
import { chunk } from "lodash-es";
import { useMemo } from "react";
import { equipmentColumns } from "../../config/equipment";
@@ -12,6 +16,7 @@ import { catImages } from "../../config/images";
import {
alternativeLines,
isAlternativeLine,
+ maxModulesPerRow,
originalLineName,
} from "../../config/modules";
import { useEquipment } from "../../hooks/useEquipment";
@@ -21,7 +26,7 @@ import { useUpgradePreset } from "../../hooks/useUpgradePreset";
import { Tankopedia } from "../../stores/tankopedia";
import { Button } from "../Button";
import { Heading } from "../Heading";
-import { IconButton } from "../IconButton";
+import { Link } from "../Link";
import { Price } from "../Price";
import { Section } from "../Section";
import { Text } from "../Text";
@@ -167,7 +172,7 @@ function Modules() {
{strings.tanks.loadout.modules}
- {
Tankopedia.mutate((draft) => {
for (const line of tank.tank!.upgrade_lines) {
@@ -178,13 +183,12 @@ function Modules() {
}
});
}}
- color="tomato"
- variant="ghost"
+ color="gray"
>
-
-
+
+
- {
Tankopedia.mutate((draft) => {
for (const line of tank.tank!.upgrade_lines) {
@@ -197,11 +201,10 @@ function Modules() {
}
});
}}
- color="jade"
- variant="ghost"
+ color="gray"
>
-
-
+
+
@@ -254,8 +257,23 @@ function Line({ name, lines }: LineProps) {
function LineInner({ name, lines }: LineProps) {
const line = lines.find((line) => line.name === name)!;
- return line.stages.map((stage, index) => (
-
+ return chunk(line.stages, maxModulesPerRow).map((chunk, wrapIndex) => (
+
+ {wrapIndex > 0 && (
+
+
+
+ )}
+
+ {chunk.map((stage, elementIndex) => (
+
+ ))}
+
));
}
@@ -297,6 +315,8 @@ function LineElement({ index, lineName, stage }: LineElementProps) {
price = override.price;
}
+ price ??= StandardPrice.create();
+
let isSelected: boolean;
if (isAlternativeLine(lineName)) {
@@ -395,7 +415,7 @@ function LineElement({ index, lineName, stage }: LineElementProps) {
- {price &&
}
+ {
}
);
}
diff --git a/packages/website-ue/src/config/modules.ts b/packages/website-ue/src/config/modules.ts
index 000542f10..a79219a97 100644
--- a/packages/website-ue/src/config/modules.ts
+++ b/packages/website-ue/src/config/modules.ts
@@ -1,3 +1,5 @@
+export const maxModulesPerRow = 5;
+
export const alternativeLines: Record
= {
guns: "alternative_guns",
};
diff --git a/packages/website-ue/src/pages/[...locale]/tanks/[slug]/index.astro b/packages/website-ue/src/pages/[...locale]/tanks/[slug]/index.astro
index 1000dc533..0b4cb5a94 100644
--- a/packages/website-ue/src/pages/[...locale]/tanks/[slug]/index.astro
+++ b/packages/website-ue/src/pages/[...locale]/tanks/[slug]/index.astro
@@ -2,7 +2,6 @@
import "@radix-ui/colors/violet-dark.css";
import { api } from "../../../../api/dynamic";
import { mixStaticPaths } from "../../../../astro/mixStaticPaths";
-import ColorScale from "../../../../components/ColorScale.astro";
import BaseLayout from "../../../../layouts/BaseLayout.astro";
import { getStaticPaths as _getStaticPaths } from "../index.astro";
import { Page } from "./_index";
@@ -20,8 +19,6 @@ const { id, locale } = Astro.props;
---
-
-