fix: update all

This commit is contained in:
TrèsAbhi committed 2026-03-31 14:11:45 -05:00
1 parent bdea9fdab3
commit e2f50871ec
86 files changed
+1939 -1537

No files matched your search

+36 -36
View File
@@ -5,20 +5,20 @@ import {
TankType,
type CompositeStats,
type CompositeStatsKey,
} from '@blitzkit/core';
import strings from '@blitzkit/i18n/strings/en.json';
import { amberDark, blueDark } from '@radix-ui/colors';
import { Flex, Text, type FlexProps } from '@radix-ui/themes';
import { times } from 'lodash-es';
import type { ReactNode } from 'react';
import { breakdownConfig } from '../constants/embeds';
import { toRadiusVar } from '../core/radix/utils';
import { useLocale } from '../hooks/useLocale';
import { useEmbedStateCurry } from '../stores/embedState/utilities';
import { ClassHeavy } from './ClassIcon/components/ClassHeavy';
import { ClassLight } from './ClassIcon/components/ClassLight';
import { ClassMedium } from './ClassIcon/components/ClassMedium';
import { ClassTankDestroyer } from './ClassIcon/components/ClassTankDestroyer';
} from "@blitzkit/core";
import strings from "@blitzkit/i18n/strings/en.json";
import { amberDark, blueDark } from "@radix-ui/colors";
import { Flex, Text, type FlexProps } from "@radix-ui/themes";
import { times } from "lodash-es";
import type { ReactNode } from "react";
import { breakdownConfig } from "../constants/embeds";
import { toRadiusVar } from "../core/radix/utils";
import { useLocale } from "../hooks/useLocale";
import { useEmbedStateCurry } from "../stores/embedState/utilities";
import { ClassHeavy } from "./ClassIcon/components/ClassHeavy";
import { ClassLight } from "./ClassIcon/components/ClassLight";
import { ClassMedium } from "./ClassIcon/components/ClassMedium";
import { ClassTankDestroyer } from "./ClassIcon/components/ClassTankDestroyer";
type BreakdownEmbedWrapperProps = FlexProps & {
children: ReactNode;
@@ -33,7 +33,7 @@ export function BreakdownEmbedWrapper({
return (
<Flex
direction="column"
gap={useEmbedState('listGap')}
gap={useEmbedState("listGap")}
height="100%"
{...props}
>
@@ -60,65 +60,65 @@ export function BreakdownEmbedCard({
flexShrink="0"
direction="column"
style={{
borderRadius: toRadiusVar(useEmbedState('cardRadius')),
overflow: 'hidden',
backgroundColor: useEmbedState('cardBodyBackgroundColor'),
borderRadius: toRadiusVar(useEmbedState("cardRadius")),
overflow: "hidden",
backgroundColor: useEmbedState("cardBodyBackgroundColor"),
}}
>
<Flex
justify="center"
style={{
backgroundColor: useEmbedState('cardHeaderBackgroundColor'),
backgroundColor: useEmbedState("cardHeaderBackgroundColor"),
}}
p={useEmbedState('cardHeaderPadding')}
p={useEmbedState("cardHeaderPadding")}
>
<Text
{...{
...useRichText('cardTitle'),
...useRichText("cardTitle"),
style:
tank === null
? undefined
: tank === undefined ||
tank.type === TankType.RESEARCHABLE ||
!useEmbedState('cardTitleTypeColor')
tank.type === TankType.TANK_TYPE_RESEARCHABLE ||
!useEmbedState("cardTitleTypeColor")
? undefined
: {
color:
tank.type === TankType.PREMIUM
tank.type === TankType.TANK_TYPE_PREMIUM
? amberDark.amber11
: blueDark.blue11,
},
}}
>
<Flex align="center" gap="1">
{useEmbedState('cardTitleClassIcon') &&
{useEmbedState("cardTitleClassIcon") &&
tank !== null &&
tank !== undefined && (
<>
{tank.class === TankClass.LIGHT && (
{tank.class === TankClass.TANK_CLASS_LIGHT && (
<ClassLight width="1em" height="1em" />
)}
{tank.class === TankClass.MEDIUM && (
{tank.class === TankClass.TANK_CLASS_MEDIUM && (
<ClassMedium width="1em" height="1em" />
)}
{tank.class === TankClass.HEAVY && (
{tank.class === TankClass.TANK_CLASS_HEAVY && (
<ClassHeavy width="1em" height="1em" />
)}
{tank.class === TankClass.TANK_DESTROYER && (
{tank.class === TankClass.TANK_CLASS_TANK_DESTROYER && (
<ClassTankDestroyer width="1em" height="1em" />
)}
</>
)}{' '}
)}{" "}
{tank === null
? 'Total'
? "Total"
: tank === undefined
? `Unknown tank`
: unwrap(tank.name)}
: unwrap(tank.name!)}
</Flex>
</Text>
</Flex>
<Flex p={useEmbedState('cardBodyPadding')}>
<Flex p={useEmbedState("cardBodyPadding")}>
{times(4, (index) => {
const column = (index + 1) as 1 | 2 | 3 | 4;
const statKey = useEmbedState(`column${column}`) as CompositeStatsKey;
@@ -129,13 +129,13 @@ export function BreakdownEmbedCard({
key={column}
direction="column"
align="center"
gap={useEmbedState('columnGap')}
gap={useEmbedState("columnGap")}
flexGrow="1"
>
<Text {...useRichText('columnValue')}>
<Text {...useRichText("columnValue")}>
{formatCompositeStat(composite[statKey], statKey, composite)}
</Text>
<Text {...useRichText('columnLabel')}>
<Text {...useRichText("columnLabel")}>
{customLabel.length === 0
? strings.common.composite_stats[statKey]
: customLabel}