mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
feat: more responsive
This commit is contained in:
1 parent
efe6d2b1a5
commit
37ca981d33
8 files changed
+41
-34
No files matched your search
+3
-2
@@ -9,6 +9,7 @@ import { useLocale } from '../../../../../../hooks/useLocale';
|
|||||||
import { Duel } from '../../../../../../stores/duel';
|
import { Duel } from '../../../../../../stores/duel';
|
||||||
import type { StatsAcceptorProps } from './HullTraverseVisualizer';
|
import type { StatsAcceptorProps } from './HullTraverseVisualizer';
|
||||||
import { InfoWithDelta } from './InfoWithDelta';
|
import { InfoWithDelta } from './InfoWithDelta';
|
||||||
|
import { StatsTableWrapper } from './StatsTableWrapper';
|
||||||
|
|
||||||
const provisionDefinitions = await awaitableProvisionDefinitions;
|
const provisionDefinitions = await awaitableProvisionDefinitions;
|
||||||
|
|
||||||
@@ -28,7 +29,7 @@ export function Crew({ stats }: StatsAcceptorProps) {
|
|||||||
const commanderMastery = 1 + provisionCrewBonus;
|
const commanderMastery = 1 + provisionCrewBonus;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex direction="column" gap="2" width="16rem">
|
<StatsTableWrapper>
|
||||||
<Flex gap="2" align="center">
|
<Flex gap="2" align="center">
|
||||||
<Heading size="5">
|
<Heading size="5">
|
||||||
{strings.website.tools.tankopedia.crew.title}
|
{strings.website.tools.tankopedia.crew.title}
|
||||||
@@ -107,6 +108,6 @@ export function Crew({ stats }: StatsAcceptorProps) {
|
|||||||
</Fragment>
|
</Fragment>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</Flex>
|
</StatsTableWrapper>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
+3
-2
@@ -25,6 +25,7 @@ import type { StatsAcceptorProps } from './HullTraverseVisualizer';
|
|||||||
import { Info } from './Info';
|
import { Info } from './Info';
|
||||||
import { InfoWithDelta } from './InfoWithDelta';
|
import { InfoWithDelta } from './InfoWithDelta';
|
||||||
import { RicochetVisualizer } from './RicochetVisualizer';
|
import { RicochetVisualizer } from './RicochetVisualizer';
|
||||||
|
import { StatsTableWrapper } from './StatsTableWrapper';
|
||||||
|
|
||||||
export function Firepower({ stats }: StatsAcceptorProps) {
|
export function Firepower({ stats }: StatsAcceptorProps) {
|
||||||
const mutateDuel = Duel.useMutation();
|
const mutateDuel = Duel.useMutation();
|
||||||
@@ -57,7 +58,7 @@ export function Firepower({ stats }: StatsAcceptorProps) {
|
|||||||
}, [penetrationDistance]);
|
}, [penetrationDistance]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex direction="column" gap="2" width="16rem">
|
<StatsTableWrapper>
|
||||||
<Flex align="center" gap="4">
|
<Flex align="center" gap="4">
|
||||||
<Heading size="5">
|
<Heading size="5">
|
||||||
{strings.website.tools.tankopedia.firepower.title}
|
{strings.website.tools.tankopedia.firepower.title}
|
||||||
@@ -409,6 +410,6 @@ export function Firepower({ stats }: StatsAcceptorProps) {
|
|||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Flex>
|
</StatsTableWrapper>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
+4
-3
@@ -1,4 +1,4 @@
|
|||||||
import { Flex, Heading } from '@radix-ui/themes';
|
import { Heading } from '@radix-ui/themes';
|
||||||
import { useLocale } from '../../../../../../hooks/useLocale';
|
import { useLocale } from '../../../../../../hooks/useLocale';
|
||||||
import {
|
import {
|
||||||
HullTraverseVisualizer,
|
HullTraverseVisualizer,
|
||||||
@@ -6,12 +6,13 @@ import {
|
|||||||
} from './HullTraverseVisualizer';
|
} from './HullTraverseVisualizer';
|
||||||
import { Info } from './Info';
|
import { Info } from './Info';
|
||||||
import { InfoWithDelta } from './InfoWithDelta';
|
import { InfoWithDelta } from './InfoWithDelta';
|
||||||
|
import { StatsTableWrapper } from './StatsTableWrapper';
|
||||||
|
|
||||||
export function Maneuverability({ stats }: StatsAcceptorProps) {
|
export function Maneuverability({ stats }: StatsAcceptorProps) {
|
||||||
const { strings } = useLocale();
|
const { strings } = useLocale();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex direction="column" gap="2" width="16rem">
|
<StatsTableWrapper>
|
||||||
<Heading size="5">
|
<Heading size="5">
|
||||||
{strings.website.tools.tankopedia.maneuverability.title}
|
{strings.website.tools.tankopedia.maneuverability.title}
|
||||||
</Heading>
|
</Heading>
|
||||||
@@ -145,6 +146,6 @@ export function Maneuverability({ stats }: StatsAcceptorProps) {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<HullTraverseVisualizer stats={stats} />
|
<HullTraverseVisualizer stats={stats} />
|
||||||
</Flex>
|
</StatsTableWrapper>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
+5
-5
@@ -46,7 +46,7 @@ export function RicochetVisualizer({ stats }: StatsAcceptorProps) {
|
|||||||
top="0"
|
top="0"
|
||||||
left="0"
|
left="0"
|
||||||
style={{
|
style={{
|
||||||
background: `linear-gradient(to right, ${Var('gray-a1')}, ${Var('gray-a5')})`,
|
background: `linear-gradient(to right, transparent, ${Var('gray-a4')})`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
@@ -104,12 +104,12 @@ export function RicochetVisualizer({ stats }: StatsAcceptorProps) {
|
|||||||
bottom="100%"
|
bottom="100%"
|
||||||
style={{
|
style={{
|
||||||
transform: 'translateX(-50%)',
|
transform: 'translateX(-50%)',
|
||||||
backgroundColor: Var('gray-a5'),
|
backgroundColor: Var('gray-a8'),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Box
|
<Box
|
||||||
position="absolute"
|
position="absolute"
|
||||||
width="2px"
|
width="3px"
|
||||||
height="100%"
|
height="100%"
|
||||||
style={{
|
style={{
|
||||||
transform: 'translateX(-50%)',
|
transform: 'translateX(-50%)',
|
||||||
@@ -127,7 +127,7 @@ export function RicochetVisualizer({ stats }: StatsAcceptorProps) {
|
|||||||
height: '2rem',
|
height: '2rem',
|
||||||
top: '6rem',
|
top: '6rem',
|
||||||
left: 0,
|
left: 0,
|
||||||
filter: 'drop-shadow(0px 0px 4px black)',
|
filter: 'drop-shadow(0px 0px 0.25rem black)',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
@@ -144,7 +144,7 @@ export function RicochetVisualizer({ stats }: StatsAcceptorProps) {
|
|||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
position="absolute"
|
position="absolute"
|
||||||
width="2px"
|
width="3px"
|
||||||
height="100%"
|
height="100%"
|
||||||
top="-100%"
|
top="-100%"
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
import { Flex, type FlexProps } from '@radix-ui/themes';
|
||||||
|
|
||||||
|
export function StatsTableWrapper(props: FlexProps) {
|
||||||
|
return (
|
||||||
|
<Flex
|
||||||
|
direction="column"
|
||||||
|
gap="2"
|
||||||
|
width={{ initial: '16rem', xs: '20rem', md: '16rem', xl: '20rem' }}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
+4
-3
@@ -1,15 +1,16 @@
|
|||||||
import { Flex, Heading } from '@radix-ui/themes';
|
import { Heading } from '@radix-ui/themes';
|
||||||
import { useLocale } from '../../../../../../hooks/useLocale';
|
import { useLocale } from '../../../../../../hooks/useLocale';
|
||||||
import type { StatsAcceptorProps } from './HullTraverseVisualizer';
|
import type { StatsAcceptorProps } from './HullTraverseVisualizer';
|
||||||
import { Info } from './Info';
|
import { Info } from './Info';
|
||||||
import { InfoWithDelta } from './InfoWithDelta';
|
import { InfoWithDelta } from './InfoWithDelta';
|
||||||
|
import { StatsTableWrapper } from './StatsTableWrapper';
|
||||||
import { ViewRangeVisualizer } from './ViewRangeVisualizer';
|
import { ViewRangeVisualizer } from './ViewRangeVisualizer';
|
||||||
|
|
||||||
export function Survivability({ stats }: StatsAcceptorProps) {
|
export function Survivability({ stats }: StatsAcceptorProps) {
|
||||||
const { strings } = useLocale();
|
const { strings } = useLocale();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex direction="column" gap="2" width="16rem">
|
<StatsTableWrapper>
|
||||||
<Heading size="5">
|
<Heading size="5">
|
||||||
{strings.website.tools.tankopedia.survivability.title}
|
{strings.website.tools.tankopedia.survivability.title}
|
||||||
</Heading>
|
</Heading>
|
||||||
@@ -110,6 +111,6 @@ export function Survivability({ stats }: StatsAcceptorProps) {
|
|||||||
stats={stats}
|
stats={stats}
|
||||||
value="volume"
|
value="volume"
|
||||||
/>
|
/>
|
||||||
</Flex>
|
</StatsTableWrapper>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
+8
-11
@@ -83,19 +83,16 @@ export function Characteristics() {
|
|||||||
}, [hasImprovedVerticalStabilizer, hasDownImprovedVerticalStabilizer]);
|
}, [hasImprovedVerticalStabilizer, hasDownImprovedVerticalStabilizer]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex gap="8" direction={{ initial: 'column', md: 'row' }}>
|
||||||
gap="8"
|
|
||||||
direction={{
|
|
||||||
initial: 'column',
|
|
||||||
lg: 'row',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Firepower stats={stats} />
|
<Firepower stats={stats} />
|
||||||
<Maneuverability stats={stats} />
|
|
||||||
|
|
||||||
<Flex direction="column" gap="8">
|
<Flex gap="8" direction={{ initial: 'column', lg: 'row' }}>
|
||||||
<Survivability stats={stats} />
|
<Maneuverability stats={stats} />
|
||||||
<Crew stats={stats} />
|
|
||||||
|
<Flex gap="8" direction="column">
|
||||||
|
<Survivability stats={stats} />
|
||||||
|
<Crew stats={stats} />
|
||||||
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export function CharacteristicsSection() {
|
|||||||
<Flex
|
<Flex
|
||||||
direction="column"
|
direction="column"
|
||||||
gap="6"
|
gap="6"
|
||||||
maxWidth="21rem"
|
maxWidth="19rem"
|
||||||
align={{ initial: 'center', sm: 'start' }}
|
align={{ initial: 'center', sm: 'start' }}
|
||||||
>
|
>
|
||||||
<Modules />
|
<Modules />
|
||||||
@@ -35,13 +35,7 @@ export function CharacteristicsSection() {
|
|||||||
<Miscellaneous />
|
<Miscellaneous />
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<Flex
|
<Flex direction="column" gap="6" align="center">
|
||||||
flexGrow="1"
|
|
||||||
maxWidth={{ initial: '20rem', md: '54rem' }}
|
|
||||||
direction="column"
|
|
||||||
gap="6"
|
|
||||||
width="100%"
|
|
||||||
>
|
|
||||||
<CompareOptions display={{ initial: 'flex', sm: 'none' }} />
|
<CompareOptions display={{ initial: 'flex', sm: 'none' }} />
|
||||||
<Characteristics />
|
<Characteristics />
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|||||||
Reference in new issue
Block a user