mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
feat: no flags
This commit is contained in:
1 parent
0250546ab5
commit
e835498e59
13 files changed
+72
-61
No files matched your search
@@ -3,7 +3,6 @@
|
||||
import { ContextMenu } from '@radix-ui/themes';
|
||||
import { useEffect, useState } from 'react';
|
||||
import * as Breakdown from '../../../components/Breakdown';
|
||||
import { TreeTypeEnum } from '../../../components/Tanks';
|
||||
import { WARGAMING_APPLICATION_ID } from '../../../constants/wargamingApplicationID';
|
||||
import fetchBlitz from '../../../core/blitz/fetchBlitz';
|
||||
import {
|
||||
@@ -296,12 +295,7 @@ export default function SessionPage() {
|
||||
}
|
||||
type="tank"
|
||||
tankType={tankDefinitions?.type}
|
||||
treeType={(() => {
|
||||
if (tankDefinitions?.tree_type === 'collector')
|
||||
return TreeTypeEnum.Collector;
|
||||
if (tankDefinitions?.tree_type === 'premium')
|
||||
return TreeTypeEnum.Premium;
|
||||
})()}
|
||||
treeType={tankDefinitions?.tree_type}
|
||||
stats={session.customColumns.map((customColumn) => {
|
||||
const rowStat = rowStats[customColumn.display];
|
||||
|
||||
|
||||
@@ -1,16 +1,43 @@
|
||||
import { Flex, Heading } from '@radix-ui/themes';
|
||||
import { Flag } from '../../../../../components/Flag';
|
||||
import { UpdateIcon } from '@radix-ui/react-icons';
|
||||
import { Button, Flex, Heading } from '@radix-ui/themes';
|
||||
import { TREE_TYPE_ICONS } from '../../../../../components/Tanks';
|
||||
import { useDuel } from '../../../../../stores/duel';
|
||||
|
||||
export function Title() {
|
||||
const protagonist = useDuel((state) => state.protagonist!);
|
||||
|
||||
return (
|
||||
<Flex justify="between" align="center">
|
||||
<Flex gap="6" justify="center" align="center" style={{ padding: 16 }}>
|
||||
<Flex gap="2" align="center">
|
||||
<Flag nation={protagonist.tank.nation} />
|
||||
<Heading>{protagonist.tank.name}</Heading>
|
||||
<Heading
|
||||
color={
|
||||
protagonist.tank.tree_type === 'premium'
|
||||
? 'amber'
|
||||
: protagonist.tank.tree_type === 'collector'
|
||||
? 'blue'
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<Flex align="center" gap="2">
|
||||
<img
|
||||
src={
|
||||
TREE_TYPE_ICONS[protagonist.tank.tree_type][
|
||||
protagonist.tank.type
|
||||
]
|
||||
}
|
||||
style={{
|
||||
width: '1em',
|
||||
height: '1em',
|
||||
}}
|
||||
/>{' '}
|
||||
{protagonist.tank.name}
|
||||
</Flex>
|
||||
</Heading>
|
||||
</Flex>
|
||||
|
||||
<Button variant="ghost">
|
||||
Change <UpdateIcon />
|
||||
</Button>
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
TREE_TYPES,
|
||||
TREE_TYPE_ICONS,
|
||||
TREE_TYPE_IMAGES,
|
||||
TreeTypeEnum,
|
||||
} from '../../../../../../../components/Tanks';
|
||||
import {
|
||||
NATIONS,
|
||||
@@ -136,7 +135,7 @@ export function Options() {
|
||||
}
|
||||
>
|
||||
<img
|
||||
src={TREE_TYPE_ICONS[TreeTypeEnum.TechTree][type]}
|
||||
src={TREE_TYPE_ICONS.researchable[type]}
|
||||
style={{ width: '1em', height: '1em' }}
|
||||
/>
|
||||
</Button>
|
||||
|
||||
Reference in new issue
Block a user