feat: moved to astro

This commit is contained in:
TrèsAbhi committed 2024-09-14 18:32:36 -05:00
1 parent 292df5f5d9
commit a1721eb05e
150 files changed
+386 -363

No files matched your search

BIN
View File
Binary file not shown.
+1 -1
View File
@@ -4,7 +4,7 @@ export * from './blitzkit';
// export * from './databases';
export * from './imgur';
// export * from './math';
// export * from './patreon';
export * from './patreon';
// export * from './protobuf';
// export * from './statistics';
// export * from './streams';
@@ -1,69 +0,0 @@
import { imgur } from '@blitzkit/core';
import { Code, Flex, Heading, Text } from '@radix-ui/themes';
import { BRANCH_NAMES } from './constants';
export function Hero() {
const isBranchNamed =
process.env.NEXT_PUBLIC_ASSET_BRANCH &&
BRANCH_NAMES[process.env.NEXT_PUBLIC_ASSET_BRANCH];
return (
<Flex
align="center"
justify="center"
style={{
position: 'relative',
background: `url(${imgur('rUPie9G', { format: 'jpeg' })})`,
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
}}
px="4"
py="9"
>
<div
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
background:
'linear-gradient(var(--color-panel-translucent), var(--color-background))',
}}
/>
<Flex
direction="column"
gap="6"
align="center"
justify="center"
position="relative"
width="100%"
>
<Flex direction="column" align="center" gap="1">
<Heading size="9" weight="bold" align="center">
<Flex
align="center"
gap={{ initial: '1', xs: '4' }}
direction={{ initial: 'column', xs: 'row' }}
>
BlitzKit
{isBranchNamed && (
<Code size="8" color="gray" highContrast variant="outline">
{BRANCH_NAMES[process.env.NEXT_PUBLIC_ASSET_BRANCH!]}
</Code>
)}
</Flex>
</Heading>
{!isBranchNamed && (
<Text color="gray" align="center" size="4">
Everything World of Tanks Blitz
</Text>
)}
</Flex>
</Flex>
</Flex>
);
}
+70 -70
View File
@@ -1,7 +1,8 @@
'use client';
import { Flex, Heading } from '@radix-ui/themes';
import { AdMidSectionResponsive } from '../components/AdMidSectionResponsive';
import { Hero } from '../../../website/src/components/Hero';
import { ToolCard } from '../../../website/src/components/ToolCard';
import {
compareTool,
discordTool,
@@ -11,96 +12,95 @@ import {
tankopediaTool,
tankPerformanceTool,
} from '../../../website/src/constants/tools';
import { AdMidSectionResponsive } from '../components/AdMidSectionResponsive';
import { useAdExempt } from '../hooks/useAdExempt';
import { Hero } from './components/Hero';
import { Plugs } from './components/Plugs';
import { ToolCard } from '../../../website/src/components/ToolCard';
import { Plugs } from '../../../website/src/components/Plugs';
export default function Page() {
const exempt = useAdExempt();
return (
<>
<Hero />
<Hero />
<Plugs />
<Plugs />
<Flex p="4" justify="center" gap="4">
<Flex maxWidth="1024px" flexGrow="1" gap="4" direction="column">
<ToolCard tool={tankopediaTool} />
<Flex p="4" justify="center" gap="4">
<Flex maxWidth="1024px" flexGrow="1" gap="4" direction="column">
<ToolCard tool={tankopediaTool} />
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
{/* <ToolCard tool={playerStatsTool} /> */}
<ToolCard tool={compareTool} />
<ToolCard tool={tankPerformanceTool} />
</Flex>
{!exempt && (
<Flex justify="center">
<AdMidSectionResponsive />
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
{/* <ToolCard tool={playerStatsTool} /> */}
<ToolCard tool={compareTool} />
<ToolCard tool={tankPerformanceTool} />
</Flex>
)}
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
<ToolCard tool={sessionTool} />
{/* <ToolCard tool={embedTool} /> */}
<ToolCard tool={ratingTool} />
</Flex>
{!exempt && (
<Flex justify="center">
<AdMidSectionResponsive />
</Flex>
)}
{!exempt && (
<Flex
justify="center"
display={{
initial: 'flex',
md: 'none',
}}
>
<AdMidSectionResponsive />
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
<ToolCard tool={sessionTool} />
{/* <ToolCard tool={embedTool} /> */}
<ToolCard tool={ratingTool} />
</Flex>
)}
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
<ToolCard tool={discordTool} />
<ToolCard tool={moreTool} />
</Flex>
{!exempt && (
<Flex
justify="center"
display={{
initial: 'flex',
md: 'none',
}}
>
<AdMidSectionResponsive />
</Flex>
)}
{!exempt && <AdMidSectionResponsive />}
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
<ToolCard tool={discordTool} />
<ToolCard tool={moreTool} />
</Flex>
<Heading>Other cool projects</Heading>
{!exempt && <AdMidSectionResponsive />}
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
<ToolCard
tool={{
button: {
text: 'Analyze',
color: 'blue',
},
description: 'Rich historic average stats',
id: 'blitz-analysis',
image: 'j76YXGl',
title: 'BlitzAnalysis[]',
href: 'https://blitzanalysiz.com/',
}}
/>
<ToolCard
tool={{
button: {
color: 'purple',
text: 'Install',
highContrast: true,
},
image: 'zYrrYbR',
description: 'In-game session stats',
id: 'blitz-insider',
title: 'Blitz Insider',
href: 'https://discord.gg/UjWf9eGgtR',
}}
/>
<Heading>Other cool projects</Heading>
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
<ToolCard
tool={{
button: {
text: 'Analyze',
color: 'blue',
},
description: 'Rich historic average stats',
id: 'blitz-analysis',
image: 'j76YXGl',
title: 'BlitzAnalysis[]',
href: 'https://blitzanalysiz.com/',
}}
/>
<ToolCard
tool={{
button: {
color: 'purple',
text: 'Install',
highContrast: true,
},
image: 'zYrrYbR',
description: 'In-game session stats',
id: 'blitz-insider',
title: 'Blitz Insider',
href: 'https://discord.gg/UjWf9eGgtR',
}}
/>
</Flex>
</Flex>
</Flex>
</Flex>
<div style={{ flex: 1 }} />
<div style={{ flex: 1 }} />
</>
);
}
@@ -1,6 +1,6 @@
import { Box } from '@radix-ui/themes';
import { useEffect, useRef } from 'react';
import { previews } from '../../../../../../constants/embeds';
import { previews } from '../../../../../../../../website/src/constants/embeds';
import { useEmbedStateCurry } from '../../../../../../stores/embedState/utilities';
import * as styles from './index.css';
@@ -7,7 +7,7 @@ import { PageWrapper } from '../../../../../components/PageWrapper';
import {
configurations,
extractEmbedConfigDefaults,
} from '../../../../../constants/embeds';
} from '../../../../../../../website/src/constants/embeds';
import * as EmbedState from '../../../../../stores/embedState';
export interface EmbedPreviewControllerProps {
@@ -2,7 +2,7 @@ import { useMemo } from 'react';
import {
configurations,
extractEmbedConfigDefaults,
} from '../../../../constants/embeds';
} from '../../../../../../website/src/constants/embeds';
import * as EmbedState from '../../../../stores/embedState';
export function generateStaticParams() {
@@ -16,7 +16,7 @@ import { ReactNode, useEffect, useRef, useState } from 'react';
import { stringify } from 'urlon';
import { CopyButton } from '../../../../components/CopyButton';
import { PageWrapper } from '../../../../components/PageWrapper';
import { configurations } from '../../../../constants/embeds';
import { configurations } from '../../../../../../website/src/constants/embeds';
import * as App from '../../../../stores/app';
import * as EmbedState from '../../../../stores/embedState';
import { EmbedConfig } from '../../../../stores/embedState';
@@ -5,7 +5,7 @@ import {
BreakdownEmbedCard,
BreakdownEmbedWrapper,
} from '../../../../components/TanksEmbed';
import { breakdownConfig } from '../../../../constants/embeds';
import { breakdownConfig } from '../../../../../../website/src/constants/embeds';
import { useEmbedStateCurry } from '../../../../stores/embedState/utilities';
export const compositeStatsKeysOptions = compositeStatsKeys.map((value) => ({
+7 -2
View File
@@ -11,6 +11,11 @@
"src/**/*",
".next/types/**/*.ts",
"../../dist/website/types/**/*.ts",
"dist/website/types/**/*.ts"
, "../website/src/components/ToolCard.tsx", "../website/src/constants/tools.tsx" ]
"dist/website/types/**/*.ts",
"../website/src/components/ToolCard.tsx",
"../website/src/constants/tools.tsx",
"../website/src/components/Plugs.tsx",
"../website/src/constants/embeds.ts",
"../website/src/types"
]
}
+1
View File
@@ -17,6 +17,7 @@
"@vanilla-extract/css": "^1.15.5",
"astro": "^4.15.6",
"astro-purgecss": "^4.6.0",
"nanostores": "^0.11.3",
"purgecss": "^6.0.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
@@ -10,10 +10,10 @@ import {
import { Html } from '@react-three/drei';
import { useRef } from 'react';
import { radToDeg } from 'three/src/math/MathUtils';
import { resolveArmorIndex } from '../../../core/blitzkit/resolveArmorIndex';
import * as App from '../../../stores/app';
import * as Duel from '../../../stores/duel';
import * as TankopediaEphemeral from '../../../stores/tankopediaEphemeral';
import { resolveArmorIndex } from '../../../../../website-legacy/src/core/blitzkit/resolveArmorIndex';
import * as App from '../../../../../website-legacy/src/stores/app';
import * as Duel from '../../../../../website-legacy/src/stores/duel';
import * as TankopediaEphemeral from '../../../../../website-legacy/src/stores/tankopediaEphemeral';
import { layerTypeNames } from './ShotDisplayCard';
import { ArmorType } from './SpacedArmorScene';
@@ -1,12 +1,12 @@
import { memo, useRef } from 'react';
import { Group } from 'three';
import { correctZYTuple } from '../../../core/blitz/correctZYTuple';
import { nameToArmorId } from '../../../core/blitzkit/nameToArmorId';
import { resolveArmor } from '../../../core/blitzkit/resolveThickness';
import { useArmor } from '../../../hooks/useArmor';
import { useTankModelDefinition } from '../../../hooks/useTankModelDefinition';
import { useTankTransform } from '../../../hooks/useTankTransform';
import * as Duel from '../../../stores/duel';
import { correctZYTuple } from '../../../../../website-legacy/src/core/blitz/correctZYTuple';
import { nameToArmorId } from '../../../../../website-legacy/src/core/blitzkit/nameToArmorId';
import { resolveArmor } from '../../../../../website-legacy/src/core/blitzkit/resolveThickness';
import { useArmor } from '../../../../../website-legacy/src/hooks/useArmor';
import { useTankModelDefinition } from '../../../../../website-legacy/src/hooks/useTankModelDefinition';
import { useTankTransform } from '../../../../../website-legacy/src/hooks/useTankTransform';
import * as Duel from '../../../../../website-legacy/src/stores/duel';
import { ModelTankWrapper } from './ModelTankWrapper';
import { PrimaryArmorSceneComponent } from './PrimaryArmorSceneComponent';
@@ -9,10 +9,10 @@ import { useFrame } from '@react-three/fiber';
import { useEffect } from 'react';
import { MeshBasicMaterial, Object3D, ShaderMaterial, Vector2 } from 'three';
import { degToRad } from 'three/src/math/MathUtils';
import { hasEquipment } from '../../../../core/blitzkit/hasEquipment';
import { jsxTree } from '../../../../core/blitzkit/jsxTree';
import * as Duel from '../../../../stores/duel';
import * as TankopediaPersistent from '../../../../stores/tankopediaPersistent';
import { hasEquipment } from '../../../../../../website-legacy/src/core/blitzkit/hasEquipment';
import { jsxTree } from '../../../../../../website-legacy/src/core/blitzkit/jsxTree';
import * as Duel from '../../../../../../website-legacy/src/stores/duel';
import * as TankopediaPersistent from '../../../../../../website-legacy/src/stores/tankopediaPersistent';
import fragmentShader from './shaders/fragment.glsl';
import vertexShader from './shaders/vertex.glsl';
import { spacedArmorRenderTarget } from './target';
@@ -16,8 +16,8 @@ import {
Path,
Quaternion,
} from 'three';
import { useFullScreen } from '../../../hooks/useFullScreen';
import * as TankopediaEphemeral from '../../../stores/tankopediaEphemeral';
import { useFullScreen } from '../../../../../website-legacy/src/hooks/useFullScreen';
import * as TankopediaEphemeral from '../../../../../website-legacy/src/stores/tankopediaEphemeral';
import { ShotDisplayCard } from './ShotDisplayCard';
export const shotStatusColors: Record<
@@ -8,7 +8,7 @@ import {
} from '@radix-ui/themes';
import { ComponentProps } from 'react';
import { radToDeg } from 'three/src/math/MathUtils';
import * as TankopediaEphemeral from '../../../stores/tankopediaEphemeral';
import * as TankopediaEphemeral from '../../../../../website-legacy/src/stores/tankopediaEphemeral';
import { shotStatusColors } from './ShotDisplay';
import { ArmorType } from './SpacedArmorScene';
import { ExternalModuleVariant } from './SpacedArmorSceneComponent';
@@ -1,13 +1,13 @@
import { memo, useRef } from 'react';
import { Group, Plane, Scene, Vector3 } from 'three';
import { correctZYTuple } from '../../../core/blitz/correctZYTuple';
import { nameToArmorId } from '../../../core/blitzkit/nameToArmorId';
import { resolveArmor } from '../../../core/blitzkit/resolveThickness';
import { useArmor } from '../../../hooks/useArmor';
import { useModel } from '../../../hooks/useModel';
import { useTankModelDefinition } from '../../../hooks/useTankModelDefinition';
import { useTankTransform } from '../../../hooks/useTankTransform';
import * as Duel from '../../../stores/duel';
import { correctZYTuple } from '../../../../../website-legacy/src/core/blitz/correctZYTuple';
import { nameToArmorId } from '../../../../../website-legacy/src/core/blitzkit/nameToArmorId';
import { resolveArmor } from '../../../../../website-legacy/src/core/blitzkit/resolveThickness';
import { useArmor } from '../../../../../website-legacy/src/hooks/useArmor';
import { useModel } from '../../../../../website-legacy/src/hooks/useModel';
import { useTankModelDefinition } from '../../../../../website-legacy/src/hooks/useTankModelDefinition';
import { useTankTransform } from '../../../../../website-legacy/src/hooks/useTankTransform';
import * as Duel from '../../../../../website-legacy/src/stores/duel';
import { ModelTankWrapper } from './ModelTankWrapper';
import { SpacedArmorSceneComponent } from './SpacedArmorSceneComponent';
@@ -12,9 +12,9 @@ import {
ShaderMaterial,
} from 'three';
import { ArmorUserData, ExternalModuleVariant } from '../..';
import { hasEquipment } from '../../../../../../core/blitzkit/hasEquipment';
import { jsxTree } from '../../../../../../core/blitzkit/jsxTree';
import * as Duel from '../../../../../../stores/duel';
import { hasEquipment } from '../../../../../../../../website-legacy/src/core/blitzkit/hasEquipment';
import { jsxTree } from '../../../../../../../../website-legacy/src/core/blitzkit/jsxTree';
import * as Duel from '../../../../../../../../website-legacy/src/stores/duel';
import { ArmorType } from '../../../SpacedArmorScene';
import fragmentShader from './shaders/fragment.glsl';
import vertexShader from './shaders/vertex.glsl';
@@ -13,9 +13,9 @@ import {
} from 'three';
import { degToRad } from 'three/src/math/MathUtils';
import { ArmorUserData } from '../..';
import { hasEquipment } from '../../../../../../core/blitzkit/hasEquipment';
import { jsxTree } from '../../../../../../core/blitzkit/jsxTree';
import * as Duel from '../../../../../../stores/duel';
import { hasEquipment } from '../../../../../../../../website-legacy/src/core/blitzkit/hasEquipment';
import { jsxTree } from '../../../../../../../../website-legacy/src/core/blitzkit/jsxTree';
import * as Duel from '../../../../../../../../website-legacy/src/stores/duel';
import { ArmorType } from '../../../SpacedArmorScene';
import fragmentShader from './shaders/fragment.glsl';
import vertexShader from './shaders/vertex.glsl';
@@ -17,11 +17,11 @@ import {
Vector3,
} from 'three';
import { degToRad } from 'three/src/math/MathUtils';
import { hasEquipment } from '../../../../core/blitzkit/hasEquipment';
import { jsxTree } from '../../../../core/blitzkit/jsxTree';
import { discardClippingPlane } from '../../../../core/three/discardClippingPlane';
import * as Duel from '../../../../stores/duel';
import * as TankopediaEphemeral from '../../../../stores/tankopediaEphemeral';
import { hasEquipment } from '../../../../../../website-legacy/src/core/blitzkit/hasEquipment';
import { jsxTree } from '../../../../../../website-legacy/src/core/blitzkit/jsxTree';
import { discardClippingPlane } from '../../../../../../website-legacy/src/core/three/discardClippingPlane';
import * as Duel from '../../../../../../website-legacy/src/stores/duel';
import * as TankopediaEphemeral from '../../../../../../website-legacy/src/stores/tankopediaEphemeral';
import { ArmorType } from '../SpacedArmorScene';
import { SpacedArmorSubExternal } from './components/SpacedArmorSubExternal';
import { SpacedArmorSubSpaced } from './components/SpacedArmorSubSpaced';
@@ -2,19 +2,19 @@ import { normalizeAngleRad } from '@blitzkit/core';
import { ThreeEvent, useThree } from '@react-three/fiber';
import { memo, useRef } from 'react';
import { Group, Plane, Vector2, Vector3 } from 'three';
import { applyPitchYawLimits } from '../../../core/blitz/applyPitchYawLimits';
import { correctZYTuple } from '../../../core/blitz/correctZYTuple';
import { hasEquipment } from '../../../core/blitzkit/hasEquipment';
import { modelTransformEvent } from '../../../core/blitzkit/modelTransform';
import { nameToArmorId } from '../../../core/blitzkit/nameToArmorId';
import { resolveArmor } from '../../../core/blitzkit/resolveThickness';
import { useArmor } from '../../../hooks/useArmor';
import { useModel } from '../../../hooks/useModel';
import { useTankModelDefinition } from '../../../hooks/useTankModelDefinition';
import { useTankTransform } from '../../../hooks/useTankTransform';
import * as Duel from '../../../stores/duel';
import * as TankopediaEphemeral from '../../../stores/tankopediaEphemeral';
import * as TankopediaPersistent from '../../../stores/tankopediaPersistent';
import { applyPitchYawLimits } from '../../../../../website-legacy/src/core/blitz/applyPitchYawLimits';
import { correctZYTuple } from '../../../../../website-legacy/src/core/blitz/correctZYTuple';
import { hasEquipment } from '../../../../../website-legacy/src/core/blitzkit/hasEquipment';
import { modelTransformEvent } from '../../../../../website-legacy/src/core/blitzkit/modelTransform';
import { nameToArmorId } from '../../../../../website-legacy/src/core/blitzkit/nameToArmorId';
import { resolveArmor } from '../../../../../website-legacy/src/core/blitzkit/resolveThickness';
import { useArmor } from '../../../../../website-legacy/src/hooks/useArmor';
import { useModel } from '../../../../../website-legacy/src/hooks/useModel';
import { useTankModelDefinition } from '../../../../../website-legacy/src/hooks/useTankModelDefinition';
import { useTankTransform } from '../../../../../website-legacy/src/hooks/useTankTransform';
import * as Duel from '../../../../../website-legacy/src/stores/duel';
import * as TankopediaEphemeral from '../../../../../website-legacy/src/stores/tankopediaEphemeral';
import * as TankopediaPersistent from '../../../../../website-legacy/src/stores/tankopediaPersistent';
import { ModelTankWrapper } from './ModelTankWrapper';
import { ArmorType } from './SpacedArmorScene';
import { StaticArmorSceneComponent } from './StaticArmorSceneComponent';
@@ -15,14 +15,14 @@ import {
Quaternion,
Vector3,
} from 'three';
import { unrotateDavaVector } from '../../../core/blitz/unrotateDavaVector';
import { jsxTree } from '../../../core/blitzkit/jsxTree';
import { unrotateDavaVector } from '../../../../../website-legacy/src/core/blitz/unrotateDavaVector';
import { jsxTree } from '../../../../../website-legacy/src/core/blitzkit/jsxTree';
import {
ModelTransformEventData,
modelTransformEvent,
} from '../../../core/blitzkit/modelTransform';
import { discardClippingPlane } from '../../../core/three/discardClippingPlane';
import * as TankopediaEphemeral from '../../../stores/tankopediaEphemeral';
} from '../../../../../website-legacy/src/core/blitzkit/modelTransform';
import { discardClippingPlane } from '../../../../../website-legacy/src/core/three/discardClippingPlane';
import * as TankopediaEphemeral from '../../../../../website-legacy/src/stores/tankopediaEphemeral';
import { ArmorType } from './SpacedArmorScene';
import {
ArmorUserData,
@@ -1,7 +1,7 @@
import { EquipmentPreset } from '@blitzkit/core';
import { Flex } from '@radix-ui/themes';
import { cloneDeep } from 'lodash';
import { EquipmentMatrix } from '../stores/duel';
import { EquipmentMatrix } from '../../../website-legacy/src/stores/duel';
import { EquipmentButton } from './ModuleButtons/EquipmentButton';
interface EquipmentManagerProps {
@@ -0,0 +1,77 @@
---
import { imgur } from '@blitzkit/core';
import { Code, Flex, Heading, Text } from '@radix-ui/themes';
import { BRANCH_NAMES } from '../constants/branches';
const isBranchNamed =
process.env.NEXT_PUBLIC_ASSET_BRANCH &&
BRANCH_NAMES[process.env.NEXT_PUBLIC_ASSET_BRANCH];
---
<style>
.container {
background: var(--backgroundImage);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
</style>
<Flex
className="container"
style={{ backgroundImage: `url(${imgur('rUPie9G', { format: 'jpeg' })})` }}
align="center"
justify="center"
position="relative"
px="4"
py="9"
>
<div
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
background:
'linear-gradient(var(--color-panel-translucent), var(--color-background))',
}}
>
</div>
<Flex
direction="column"
gap="6"
align="center"
justify="center"
position="relative"
width="100%"
>
<Flex direction="column" align="center" gap="1">
<Heading size="9" weight="bold" align="center">
<Flex
align="center"
gap={{ initial: '1', xs: '4' }}
direction={{ initial: 'column', xs: 'row' }}
>
BlitzKit
{
isBranchNamed && (
<Code size="8" color="gray" highContrast variant="outline">
{BRANCH_NAMES[process.env.NEXT_PUBLIC_ASSET_BRANCH!]}
</Code>
)
}
</Flex>
</Heading>
{
!isBranchNamed && (
<Text color="gray" align="center" size="4">
Everything World of Tanks Blitz
</Text>
)
}
</Flex>
</Flex>
</Flex>
@@ -2,7 +2,7 @@ import { asset, consumableDefinitions } from '@blitzkit/core';
import { ClockIcon, ReloadIcon } from '@radix-ui/react-icons';
import { Flex, Text } from '@radix-ui/themes';
import { use } from 'react';
import { useDelta } from '../../hooks/useDelta';
import { useDelta } from '../../../../website-legacy/src/hooks/useDelta';
import { GenericTankComponentButton } from './GenericTankComponentButton';
import { TankComponentButtonProps } from './TankComponentButton';
@@ -1,7 +1,7 @@
import { getAccountInfo, idToRegion } from '@blitzkit/core';
import { Text } from '@radix-ui/themes';
import { use, useMemo } from 'react';
import * as App from '../../../stores/app';
import * as App from '../../../../../website-legacy/src/stores/app';
export function WargamingAccountName() {
const wargaming = App.use((state) => state.logins.wargaming!);
@@ -29,9 +29,9 @@ import {
} from '@radix-ui/themes';
import { usePathname } from 'next/navigation';
import { Fragment, Suspense, useState } from 'react';
import { BRANCH_NAMES } from '../../app/components/Hero/constants';
import { homeTool, TOOLS } from '../../../../website/src/constants/tools';
import * as App from '../../stores/app';
import * as App from '../../../../website-legacy/src/stores/app';
import { BRANCH_NAMES } from '../../../../website/src/components/Hero/constants';
import { homeTool, TOOLS } from '../../constants/tools';
import { Link } from '../Link';
import { PatreonIcon } from '../PatreonIcon';
import { WargamingIcon } from '../WargamingIcon';
@@ -1,6 +1,6 @@
import { Flex, FlexProps, Theme } from '@radix-ui/themes';
import { ComponentProps } from 'react';
import { RadixSize } from '../stores/embedState';
import { RadixSize } from '../../../website-legacy/src/stores/embedState';
type PageWrapperProps = FlexProps & {
color?: ComponentProps<typeof Theme>['accentColor'];
@@ -12,9 +12,9 @@ import {
Text,
} from '@radix-ui/themes';
import { useLayoutEffect, useState } from 'react';
import { PatreonIcon } from '../../components/PatreonIcon';
import { useAdExempt } from '../../hooks/useAdExempt';
import * as App from '../../stores/app';
import { useAdExempt } from '../hooks/useAdExempt';
import * as App from '../stores/app';
import { PatreonIcon } from './PatreonIcon';
export function Plugs() {
const [hasPatreon, setHasPatreon] = useState(false);
@@ -8,9 +8,9 @@ import { amberDark, blueDark } from '@radix-ui/colors';
import { Flex, Text } from '@radix-ui/themes';
import { times } from 'lodash';
import { ReactNode } from 'react';
import { toRadiusVar } from '../../../website-legacy/src/core/radix/utils';
import { useEmbedStateCurry } from '../../../website-legacy/src/stores/embedState/utilities';
import { breakdownConfig } from '../constants/embeds';
import { toRadiusVar } from '../core/radix/utils';
import { useEmbedStateCurry } from '../stores/embedState/utilities';
import { ClassHeavy } from './ClassIcon/components/ClassHeavy';
import { ClassLight } from './ClassIcon/components/ClassLight';
import { ClassMedium } from './ClassIcon/components/ClassMedium';
@@ -12,6 +12,8 @@ const { tool } = Astro.props;
const disabled = tool.branches?.every(
(branch) => branch !== assertSecret(process.env.PUBLIC_ASSET_BRANCH),
);
console.log(process.env);
---
<style>
@@ -40,11 +42,6 @@ const disabled = tool.branches?.every(
</style>
<Flex
data-disabled={disabled}
data-significant={tool.significant}
className="container"
position="relative"
overflow="hidden"
style={{
backgroundImage: `url(${imgur(tool.image, {
format: 'jpeg',
@@ -53,6 +50,11 @@ const disabled = tool.branches?.every(
: ImgurSize.LargeThumbnail,
})})`,
}}
data-disabled={disabled}
data-significant={tool.significant}
className="container"
position="relative"
overflow="hidden"
flexGrow={tool.significant ? undefined : '1'}
flexBasis={tool.significant ? undefined : { initial: undefined, sm: '0' }}
>
@@ -65,7 +67,7 @@ const disabled = tool.branches?.every(
<Box
flexGrow="1"
style={{
// backgroundImage: `url(${imgur(tool.image, { format: 'jpeg', size })})`,
backgroundImage: `url(${imgur(tool.image, { format: 'jpeg' })})`,
backgroundSize: 'cover',
backgroundPosition: 'center',
}}
@@ -4,9 +4,9 @@ import { ReactNode } from 'react';
import {
BreakdownPreview,
compositeStatsKeysOptions,
} from '../app/tools/embed/configurations/breakdown';
import { EmbedConfig, ExtractEmbedConfigTypes } from '../stores/embedState';
import { EmbedItemType } from '../stores/embedState/constants';
} from '../../../website-legacy/src/app/tools/embed/configurations/breakdown';
import { EmbedConfig, ExtractEmbedConfigTypes } from '../../../website-legacy/src/stores/embedState';
import { EmbedItemType } from '../../../website-legacy/src/stores/embedState/constants';
export const breakdownConfig = {
width: { type: EmbedItemType.Slider, default: 320, min: 128, max: 640 },
Loaded 100 of 150 files, more files were not shown because too many files have changed in this diff. Show more