diff --git a/src/app/tools/tankopedia/[id]/components/Control.tsx b/src/app/tools/tankopedia/[id]/components/Control.tsx index 0bbdd0caa..6e715ad08 100644 --- a/src/app/tools/tankopedia/[id]/components/Control.tsx +++ b/src/app/tools/tankopedia/[id]/components/Control.tsx @@ -11,7 +11,7 @@ import { useAwait } from '../../../../../hooks/useAwait'; import * as Duel from '../../../../../stores/duel'; import * as TankopediaEphemeral from '../../../../../stores/tankopediaEphemeral'; -const initialPosition = [0, 5, -16] as const; +const initialPosition = [0, 6, -32] as const; const poseDistances: Record = { [Pose.HullDown]: 15, [Pose.FaceHug]: 5, diff --git a/src/app/tools/tankopedia/[id]/components/Model/HeroSection.tsx b/src/app/tools/tankopedia/[id]/components/Model/HeroSection.tsx index 3b0baffff..a44d9d4f7 100644 --- a/src/app/tools/tankopedia/[id]/components/Model/HeroSection.tsx +++ b/src/app/tools/tankopedia/[id]/components/Model/HeroSection.tsx @@ -53,72 +53,87 @@ export function HeroSection({ id }: HeroSectionProps) { }, []); return ( - - - - - - {tank.name} - - - - BlitzKit Tankopedia - - - + - - - - - - } + + + - - - + + + {tank.name} + + - + + BlitzKit Tankopedia + + + + + + + + + + + } + > + + + + + + - + ); } diff --git a/src/app/tools/tankopedia/[id]/components/Model/MetaSection/index.tsx b/src/app/tools/tankopedia/[id]/components/Model/MetaSection/index.tsx index 5a8718d69..de21f6ff3 100644 --- a/src/app/tools/tankopedia/[id]/components/Model/MetaSection/index.tsx +++ b/src/app/tools/tankopedia/[id]/components/Model/MetaSection/index.tsx @@ -1,6 +1,8 @@ -import { Code, Flex } from '@radix-ui/themes'; +import { ChevronLeftIcon, MixIcon } from '@radix-ui/react-icons'; +import { Button, Code, Flex } from '@radix-ui/themes'; import { Suspense } from 'react'; import { classIcons } from '../../../../../../../components/ClassIcon'; +import { Link } from '../../../../../../../components/Link'; import { asset } from '../../../../../../../core/blitzkit/asset'; import strings from '../../../../../../../lang/en-US.json'; import * as App from '../../../../../../../stores/app'; @@ -11,27 +13,48 @@ import { VotesSkeleton } from './components/VotesSkeleton'; export function MetaSection() { const developerMode = App.useDeferred(false, (state) => state.developerMode); - const tank = Duel.use((state) => state.protagonist.tank); - const ClassIcon = classIcons[tank.class]; + const protagonist = Duel.use((state) => state.protagonist.tank); + const ClassIcon = classIcons[protagonist.class]; + const antagonist = Duel.use((state) => state.antagonist.tank); + const compareTanks = + protagonist.id === antagonist.id + ? [protagonist.id] + : [protagonist.id, antagonist.id]; return ( + + + + + + + + + + - {tank.nameFull && ( - {tank.nameFull} + {protagonist.nameFull && ( + {protagonist.nameFull} )} {tank.nation} { strings.common.nations[ - tank.nation as keyof typeof strings.common.nations + protagonist.nation as keyof typeof strings.common.nations ] } @@ -39,34 +62,34 @@ export function MetaSection() { - {strings.common.tank_class_short[tank.class]} + {strings.common.tank_class_short[protagonist.class]} - {tank.tier} + {protagonist.tier} - {strings.common.tree_type[tank.treeType]} + {strings.common.tree_type[protagonist.treeType]} {developerMode && ( - {tank.id} + {protagonist.id} )} - {tank.treeType === 'premium' && ( + {protagonist.treeType === 'premium' && ( - {tank.price.value / 400} + {protagonist.price.value / 400} gold )} - {tank.price.value.toLocaleString()} + {protagonist.price.value.toLocaleString()} {tank.price.type} - {(tank.price.value / 2).toLocaleString()} + {(protagonist.price.value / 2).toLocaleString()} {tank.price.type} - {tank.xp && ( + {protagonist.xp && ( - {tank.xp.toLocaleString()} + {protagonist.xp.toLocaleString()} xp( TankopediaDisplay.Model, ); - const antagonist = Duel.use((state) => state.antagonist.tank); - const protagonist = Duel.use((state) => state.protagonist.tank); - const compareTanks = - protagonist.id === antagonist.id - ? [protagonist.id] - : [protagonist.id, antagonist.id]; const isFullScreen = useFullScreen(); const showGrid = TankopediaPersistent.use( (state) => state.model.visual.showGrid, @@ -346,26 +337,10 @@ export function Options({ thicknessRange, canvas }: OptionsProps) { direction="column" align="center" position="absolute" - bottom="2" + bottom="4" left="50%" style={{ transform: 'translateX(-50%)' }} > - - - - - - - - - - {display === TankopediaDisplay.DynamicArmor && ( diff --git a/src/core/blitzkit/var.ts b/src/core/blitzkit/var.ts index 417008b2d..af13ad7cb 100644 --- a/src/core/blitzkit/var.ts +++ b/src/core/blitzkit/var.ts @@ -1,6 +1,7 @@ type Name = | `color-${'background' | `panel-${'solid' | 'translucent'}` | 'surface' | 'overlay'}` - | `radius-${1 | 2 | 3 | 4 | 5 | 6 | 'full'}`; + | `radius-${1 | 2 | 3 | 4 | 5 | 6 | 'full'}` + | `space-${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}`; export function Var(name: Name) { return `var(--${name})`;