mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
right bar
This commit is contained in:
1 parent
699b445f79
commit
2c44bd8374
8 files changed
+48
-6
No files matched your search
+2
-1
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"words": [
|
||||
"gltf",
|
||||
"amogos"
|
||||
"amogos",
|
||||
"Tankopedia"
|
||||
]
|
||||
}
|
||||
@@ -198,7 +198,12 @@
|
||||
},
|
||||
|
||||
"tanks": {
|
||||
"characteristics": {
|
||||
"title": "Characteristics"
|
||||
},
|
||||
|
||||
"loadout": {
|
||||
"title": "Loadout",
|
||||
"modules": "Modules",
|
||||
"equipment": "Equipment",
|
||||
"alternative": "Alt"
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
.collapsible {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
gap: var(--space-4);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import type { ReactNode } from "react";
|
||||
import styles from "./index.module.css";
|
||||
import { Heading } from "../Heading";
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
export function TankopediaCollapsible({ children, title }: Props) {
|
||||
return (
|
||||
<div className={styles.collapsible}>
|
||||
<Heading size="2">{title}</Heading>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-4);
|
||||
gap: var(--space-3);
|
||||
|
||||
.upgrade-buttons {
|
||||
display: flex;
|
||||
|
||||
@@ -37,12 +37,14 @@ import styles from "./index.module.css";
|
||||
import type { ComputedCharacteristics } from "../../tankopedia/computeCharacteristics";
|
||||
import { Tooltip } from "../Tooltip";
|
||||
import { useGameStrings } from "../../hooks/useGameStrings";
|
||||
import { TankopediaCollapsible } from "../TankopediaCollapsible";
|
||||
|
||||
interface TankopediaLoadoutProps {
|
||||
characteristics: ComputedCharacteristics;
|
||||
}
|
||||
|
||||
export function TankopediaLoadout({ characteristics }: TankopediaLoadoutProps) {
|
||||
const strings = useStrings();
|
||||
const tank = useProtagonist();
|
||||
|
||||
const showModules = tank.tank!.upgrade_lines.some(
|
||||
@@ -51,9 +53,15 @@ export function TankopediaLoadout({ characteristics }: TankopediaLoadoutProps) {
|
||||
|
||||
return (
|
||||
<>
|
||||
{showModules && <Modules />}
|
||||
<Equipment />
|
||||
{/*<Consumables characteristics={characteristics} />*/}
|
||||
<TankopediaCollapsible title={strings.tanks.loadout.title}>
|
||||
{showModules && <Modules />}
|
||||
<Equipment />
|
||||
<Consumables characteristics={characteristics} />
|
||||
</TankopediaCollapsible>
|
||||
|
||||
<TankopediaCollapsible title={strings.tanks.characteristics.title}>
|
||||
lmao
|
||||
</TankopediaCollapsible>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
.page {
|
||||
max-height: 100dvh;
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
|
||||
@@ -11,7 +12,10 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
gap: var(--space-5);
|
||||
gap: var(--space-6);
|
||||
padding: var(--space-5);
|
||||
|
||||
overflow-y: auto;
|
||||
overflow-x: ;
|
||||
}
|
||||
}
|
||||
@@ -42,6 +42,7 @@ export const Page = withErrorWrapper(
|
||||
<div className={styles.sandbox}>
|
||||
<TankopediaSandbox />
|
||||
</div>
|
||||
|
||||
<div className={styles.stats}>
|
||||
<TankopediaLoadout characteristics={characteristics} />
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user