diff --git a/scripts/buildAssets/definitions.ts b/scripts/buildAssets/definitions.ts index 11e0df5dc..43a3c23a8 100644 --- a/scripts/buildAssets/definitions.ts +++ b/scripts/buildAssets/definitions.ts @@ -358,7 +358,7 @@ export async function definitions(production: boolean) { stringsCache[tank.userString], name_full: strings[tank.userString] ?? stringsCache[tank.userString], nation, - tree_type: (tank.sellPrice ? 'gold' in tank.sellPrice : false) + tree_type: tankTags.includes('collectible') ? 'collector' : (typeof tank.price === 'number' ? false : 'gold' in tank.price) ? 'premium' diff --git a/src/app/tools/tankopedia/[id]/components/Configure/components/Camouflage.tsx b/src/app/tools/tankopedia/[id]/components/Configure/components/Camouflage.tsx index d5f46c2d4..e1233adb6 100644 --- a/src/app/tools/tankopedia/[id]/components/Configure/components/Camouflage.tsx +++ b/src/app/tools/tankopedia/[id]/components/Configure/components/Camouflage.tsx @@ -1,15 +1,16 @@ -import { Flex, Heading } from '@radix-ui/themes'; +import { Heading } from '@radix-ui/themes'; import { ModuleButton } from '../../../../../../../components/ModuleButton'; import { mutateTankopediaTemporary, useTankopediaTemporary, } from '../../../../../../../stores/tankopedia'; +import { ConfigurationChildWrapper } from './ConfigurationChildWrapper'; export function Camouflage() { const camouflage = useTankopediaTemporary((state) => state.camouflage); return ( - + Camouflage - + ); } diff --git a/src/app/tools/tankopedia/[id]/components/Configure/components/ConfigurationChildWrapper.tsx b/src/app/tools/tankopedia/[id]/components/Configure/components/ConfigurationChildWrapper.tsx new file mode 100644 index 000000000..f768431ab --- /dev/null +++ b/src/app/tools/tankopedia/[id]/components/Configure/components/ConfigurationChildWrapper.tsx @@ -0,0 +1,16 @@ +import { Flex } from '@radix-ui/themes'; +import { ReactNode } from 'react'; + +interface ConfigurationChildWrapperProps { + children: ReactNode; +} + +export function ConfigurationChildWrapper({ + children, +}: ConfigurationChildWrapperProps) { + return ( + + {children} + + ); +} diff --git a/src/app/tools/tankopedia/[id]/components/Configure/components/Consumables.tsx b/src/app/tools/tankopedia/[id]/components/Configure/components/Consumables.tsx index 75267ad49..1198205f2 100644 --- a/src/app/tools/tankopedia/[id]/components/Configure/components/Consumables.tsx +++ b/src/app/tools/tankopedia/[id]/components/Configure/components/Consumables.tsx @@ -8,6 +8,7 @@ import { mutateTankopediaTemporary, useTankopediaTemporary, } from '../../../../../../../stores/tankopedia'; +import { ConfigurationChildWrapper } from './ConfigurationChildWrapper'; export function Consumables() { const protagonist = useDuel((state) => state.protagonist!); @@ -23,7 +24,7 @@ export function Consumables() { ); return ( - + Consumables{' '} (max {protagonist.tank.consumables}) @@ -59,6 +60,6 @@ export function Consumables() { ); })} - + ); } diff --git a/src/app/tools/tankopedia/[id]/components/Configure/components/Crew.tsx b/src/app/tools/tankopedia/[id]/components/Configure/components/Crew.tsx new file mode 100644 index 000000000..2eb767305 --- /dev/null +++ b/src/app/tools/tankopedia/[id]/components/Configure/components/Crew.tsx @@ -0,0 +1,29 @@ +import { Flex, Heading, Slider, TextField } from '@radix-ui/themes'; +import { ConfigurationChildWrapper } from './ConfigurationChildWrapper'; + +export function Crew() { + return ( + + Crew + + + + + % + + + + + ); +} diff --git a/src/app/tools/tankopedia/[id]/components/Configure/components/Equipments.tsx b/src/app/tools/tankopedia/[id]/components/Configure/components/Equipments.tsx index 551bb5dcc..e6e72652b 100644 --- a/src/app/tools/tankopedia/[id]/components/Configure/components/Equipments.tsx +++ b/src/app/tools/tankopedia/[id]/components/Configure/components/Equipments.tsx @@ -7,6 +7,7 @@ import { mutateTankopediaTemporary, useTankopediaTemporary, } from '../../../../../../../stores/tankopedia'; +import { ConfigurationChildWrapper } from './ConfigurationChildWrapper'; export function Equipments() { const protagonist = useDuel((state) => state.protagonist!); @@ -18,7 +19,7 @@ export function Equipments() { ); return ( - + Equipments @@ -63,6 +64,6 @@ export function Equipments() { ))} - + ); } diff --git a/src/app/tools/tankopedia/[id]/components/Configure/components/Modules.tsx b/src/app/tools/tankopedia/[id]/components/Configure/components/Modules.tsx index d42383c53..5ebea0922 100644 --- a/src/app/tools/tankopedia/[id]/components/Configure/components/Modules.tsx +++ b/src/app/tools/tankopedia/[id]/components/Configure/components/Modules.tsx @@ -2,12 +2,13 @@ import { Flex, Heading } from '@radix-ui/themes'; import { ModuleButton } from '../../../../../../../components/ModuleButton'; import { TIER_ROMAN_NUMERALS } from '../../../../../../../core/blitzkrieg/tankDefinitions'; import { mutateDuel, useDuel } from '../../../../../../../stores/duel'; +import { ConfigurationChildWrapper } from './ConfigurationChildWrapper'; export function Modules() { const protagonist = useDuel((state) => state.protagonist!); return ( - + Modules @@ -59,6 +60,6 @@ export function Modules() { })} - + ); } diff --git a/src/app/tools/tankopedia/[id]/components/Configure/components/Provisions.tsx b/src/app/tools/tankopedia/[id]/components/Configure/components/Provisions.tsx index 0c9fb0550..10ba9b4a3 100644 --- a/src/app/tools/tankopedia/[id]/components/Configure/components/Provisions.tsx +++ b/src/app/tools/tankopedia/[id]/components/Configure/components/Provisions.tsx @@ -8,6 +8,7 @@ import { mutateTankopediaTemporary, useTankopediaTemporary, } from '../../../../../../../stores/tankopedia'; +import { ConfigurationChildWrapper } from './ConfigurationChildWrapper'; export function Provisions() { const protagonist = useDuel((state) => state.protagonist!); @@ -23,7 +24,7 @@ export function Provisions() { ); return ( - + Provisions (max {protagonist.tank.provisions}) @@ -58,6 +59,6 @@ export function Provisions() { ); })} - + ); } diff --git a/src/app/tools/tankopedia/[id]/components/Configure/index.tsx b/src/app/tools/tankopedia/[id]/components/Configure/index.tsx index 32323b636..fbc138bea 100644 --- a/src/app/tools/tankopedia/[id]/components/Configure/index.tsx +++ b/src/app/tools/tankopedia/[id]/components/Configure/index.tsx @@ -1,6 +1,7 @@ import { Flex, Heading } from '@radix-ui/themes'; import { Camouflage } from './components/Camouflage'; import { Consumables } from './components/Consumables'; +import { Crew } from './components/Crew'; import { Equipments } from './components/Equipments'; import { Modules } from './components/Modules'; import { Provisions } from './components/Provisions'; @@ -10,12 +11,13 @@ export function Configure() { Configure - + - - + + + ); diff --git a/src/app/tools/tankopedia/page.css.ts b/src/app/tools/tankopedia/page.css.ts index 4065c1427..a6de47c73 100644 --- a/src/app/tools/tankopedia/page.css.ts +++ b/src/app/tools/tankopedia/page.css.ts @@ -55,3 +55,20 @@ export const alignTopRight = style({ }, }, }); + +export const configure = style({ + display: 'grid', + gridTemplateColumns: '1fr 1fr', + gap: 16, +}); + +export const configureRight = style({ + display: 'flex', + flexDirection: 'column', + gap: 8, +}); +export const configureLeft = style({ + display: 'flex', + flexDirection: 'column', + gap: 8, +});