mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: small screen compatibility
This commit is contained in:
1 parent
b8f3c3eece
commit
158ceca599
2 files changed
+9
-9
No files matched your search
@@ -9,7 +9,7 @@ import { Provisions } from './components/Provisions';
|
|||||||
|
|
||||||
export function Characteristics() {
|
export function Characteristics() {
|
||||||
return (
|
return (
|
||||||
<Tabs.Root defaultValue="configure">
|
<Tabs.Root defaultValue="configure" style={{ width: '100%' }}>
|
||||||
<Flex gap="4" direction="column">
|
<Flex gap="4" direction="column">
|
||||||
<Tabs.List>
|
<Tabs.List>
|
||||||
<Tabs.Trigger value="configure">Configure</Tabs.Trigger>
|
<Tabs.Trigger value="configure">Configure</Tabs.Trigger>
|
||||||
@@ -60,11 +60,7 @@ export function Characteristics() {
|
|||||||
<Info name="Weight" value="45" unit="mt" />
|
<Info name="Weight" value="45" unit="mt" />
|
||||||
<Info name="Speed forwards" value="55" unit="km/s" />
|
<Info name="Speed forwards" value="55" unit="km/s" />
|
||||||
<Info indent name="Backward" value="20" unit="km/s" />
|
<Info indent name="Backward" value="20" unit="km/s" />
|
||||||
<Info
|
<Info name="Power on hard terrain" value="36.86" unit="hp/kg" />
|
||||||
name="Effective power on hard terrain"
|
|
||||||
value="36.86"
|
|
||||||
unit="hp/kg"
|
|
||||||
/>
|
|
||||||
<Info
|
<Info
|
||||||
indent
|
indent
|
||||||
name="On medium terrain"
|
name="On medium terrain"
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export default function Page({ params }: { params: { id: string } }) {
|
|||||||
const id = parseInt(params.id);
|
const id = parseInt(params.id);
|
||||||
const awaitedTankDefinitions = use(tankDefinitions);
|
const awaitedTankDefinitions = use(tankDefinitions);
|
||||||
const assigned = useDuel((state) => state.assigned);
|
const assigned = useDuel((state) => state.assigned);
|
||||||
|
const wideFormat = typeof window !== 'undefined' && window.innerWidth > 880;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
mutateDuel((draft) => {
|
mutateDuel((draft) => {
|
||||||
@@ -87,7 +88,7 @@ export default function Page({ params }: { params: { id: string } }) {
|
|||||||
<Flex
|
<Flex
|
||||||
style={{ width: '100%' }}
|
style={{ width: '100%' }}
|
||||||
gap="8"
|
gap="8"
|
||||||
direction="row"
|
direction={wideFormat ? 'row' : 'column'}
|
||||||
align="start"
|
align="start"
|
||||||
justify="center"
|
justify="center"
|
||||||
>
|
>
|
||||||
@@ -96,7 +97,8 @@ export default function Page({ params }: { params: { id: string } }) {
|
|||||||
direction="column"
|
direction="column"
|
||||||
style={{
|
style={{
|
||||||
flex: 1,
|
flex: 1,
|
||||||
position: 'sticky',
|
position: wideFormat ? 'sticky' : undefined,
|
||||||
|
width: '100%',
|
||||||
top: 64,
|
top: 64,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -104,7 +106,9 @@ export default function Page({ params }: { params: { id: string } }) {
|
|||||||
<AntagonistBar />
|
<AntagonistBar />
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<Characteristics />
|
<Flex style={{ width: wideFormat ? 320 : '100%' }}>
|
||||||
|
<Characteristics />
|
||||||
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in new issue
Block a user