mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: more migration
This commit is contained in:
1 parent
a1721eb05e
commit
502dcf4e54
146 files changed
+481
-666
No files matched your search
@@ -120,6 +120,6 @@ jobs:
|
||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
||||
VIDEOS_SHEET: ${{ secrets.VIDEOS_SHEET }}
|
||||
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
|
||||
NEXT_PUBLIC_ASSET_BRANCH: ${{ github.event.inputs.cdn_branch }}
|
||||
PUBLIC_ASSET_BRANCH: ${{ github.event.inputs.cdn_branch }}
|
||||
WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }}
|
||||
run: bun build:assets --all-targets --depot --production
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
|
||||
- name: Build averages
|
||||
env:
|
||||
NEXT_PUBLIC_ASSET_BRANCH: main
|
||||
PUBLIC_ASSET_BRANCH: main
|
||||
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
|
||||
- name: Generate leaderboard
|
||||
env:
|
||||
NEXT_PUBLIC_ASSET_BRANCH: main
|
||||
PUBLIC_ASSET_BRANCH: main
|
||||
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
|
||||
- name: Generate leaderboard
|
||||
env:
|
||||
NEXT_PUBLIC_ASSET_BRANCH: main
|
||||
PUBLIC_ASSET_BRANCH: main
|
||||
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
|
||||
- name: Generate all leaderboards
|
||||
env:
|
||||
NEXT_PUBLIC_ASSET_BRANCH: main
|
||||
PUBLIC_ASSET_BRANCH: main
|
||||
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
|
||||
- name: Generate leaderboard
|
||||
env:
|
||||
NEXT_PUBLIC_ASSET_BRANCH: main
|
||||
PUBLIC_ASSET_BRANCH: main
|
||||
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
|
||||
+2
-1
@@ -32,9 +32,10 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"lodash": "^4.17.21"
|
||||
"lodash-es": "^4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/bun": "latest",
|
||||
"@types/node": "^22.5.4",
|
||||
"esbuild": "^0.19.12",
|
||||
|
||||
@@ -9,12 +9,10 @@ export async function GET(
|
||||
`https://www.patreon.com/api/oauth2/token?code=${
|
||||
params.code
|
||||
}&grant_type=authorization_code&client_id=${assertSecret(
|
||||
process.env.NEXT_PUBLIC_PATREON_CLIENT_ID,
|
||||
process.env.PUBLIC_PATREON_CLIENT_ID,
|
||||
)}&client_secret=${assertSecret(
|
||||
process.env.PATREON_CLIENT_SECRET,
|
||||
)}&redirect_uri=${assertSecret(
|
||||
process.env.NEXT_PUBLIC_PATREON_REDIRECT_URI,
|
||||
)}`,
|
||||
)}&redirect_uri=${assertSecret(process.env.PUBLIC_PATREON_REDIRECT_URI)}`,
|
||||
{
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||
|
||||
@@ -9,7 +9,7 @@ export async function GET(
|
||||
`https://www.patreon.com/api/oauth2/token?grant_type=refresh_token&refresh_token=${
|
||||
params.token
|
||||
}&client_id=${assertSecret(
|
||||
process.env.NEXT_PUBLIC_PATREON_CLIENT_ID,
|
||||
process.env.PUBLIC_PATREON_CLIENT_ID,
|
||||
)}&client_secret=${assertSecret(process.env.PATREON_CLIENT_SECRET)}`,
|
||||
{ method: 'POST' },
|
||||
);
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
tankDefinitions,
|
||||
} from '@blitzkit/core';
|
||||
import { Locale } from 'discord.js';
|
||||
import { chunk } from 'lodash';
|
||||
import { chunk } from 'lodash-es';
|
||||
import * as Breakdown from '../../components/Breakdown';
|
||||
import { CommandWrapper } from '../../components/CommandWrapper';
|
||||
import { NoData } from '../../components/NoData';
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
getTankStats,
|
||||
tankDefinitions,
|
||||
} from '@blitzkit/core';
|
||||
import { chunk } from 'lodash';
|
||||
import { chunk } from 'lodash-es';
|
||||
import markdownEscape from 'markdown-escape';
|
||||
import { addTierChoices } from '../core/discord/addTierChoices';
|
||||
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
Locale,
|
||||
SlashCommandSubcommandBuilder,
|
||||
} from 'discord.js';
|
||||
import { range } from 'lodash';
|
||||
import { range } from 'lodash-es';
|
||||
import markdownEscape from 'markdown-escape';
|
||||
import { CommandWrapper } from '../components/CommandWrapper';
|
||||
import * as Leaderboard from '../components/Leaderboard';
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
tankIcon,
|
||||
TIER_ROMAN_NUMERALS,
|
||||
} from '@blitzkit/core';
|
||||
import { clamp } from 'lodash';
|
||||
import { clamp } from 'lodash-es';
|
||||
import { CommandWrapper } from '../components/CommandWrapper';
|
||||
import { TitleBar } from '../components/TitleBar';
|
||||
import { iconPng } from '../core/blitzkit/iconPng';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { theme } from '../../../../stitches.config';
|
||||
import { MarginInputProps } from '../Root';
|
||||
import { MarginOrientation } from './constants';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { ReactNode } from 'react';
|
||||
import { theme } from '../../../../stitches.config';
|
||||
import { Margin } from '../Margin';
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
Locale,
|
||||
SlashCommandStringOption,
|
||||
} from 'discord.js';
|
||||
import { range } from 'lodash';
|
||||
import { range } from 'lodash-es';
|
||||
import { translator } from '../localization/translator';
|
||||
import { localizationObject } from './localizationObject';
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ export function fetchBlitz<Data extends object>(
|
||||
queue.push({
|
||||
url: `https://api.wotblitz.${region}/wotb/${path}/?${Object.entries({
|
||||
application_id: assertSecret(
|
||||
process.env.NEXT_PUBLIC_WARGAMING_APPLICATION_ID,
|
||||
process.env.PUBLIC_WARGAMING_APPLICATION_ID,
|
||||
),
|
||||
...params,
|
||||
})
|
||||
|
||||
@@ -11,7 +11,7 @@ export async function isValidBlitzId(id: number, token?: string) {
|
||||
|
||||
const json = await fetch(
|
||||
`https://api.wotblitz.${region}/wotb/account/info/?account_id=${id}&application_id=${assertSecret(
|
||||
process.env.NEXT_PUBLIC_WARGAMING_APPLICATION_ID,
|
||||
process.env.PUBLIC_WARGAMING_APPLICATION_ID,
|
||||
)}${
|
||||
token === undefined ? '' : `&access_token=${token}`
|
||||
}&fields=account_id%2C-account_id`,
|
||||
|
||||
@@ -2,6 +2,6 @@ import { assertSecret } from './assertSecret';
|
||||
|
||||
export function asset(path: string) {
|
||||
return `https://raw.githubusercontent.com/${assertSecret(
|
||||
process.env.NEXT_PUBLIC_ASSET_REPO,
|
||||
)}/${assertSecret(process.env.NEXT_PUBLIC_ASSET_BRANCH)}/${path}`;
|
||||
process.env.PUBLIC_ASSET_REPO,
|
||||
)}/${assertSecret(process.env.PUBLIC_ASSET_BRANCH)}/${path}`;
|
||||
}
|
||||
@@ -17,7 +17,7 @@ export async function getArchivedLatestSeasonNumber() {
|
||||
const regionsURL = (
|
||||
(await fetch(
|
||||
`https://api.github.com/repos/tresabhi/${assertSecret(
|
||||
process.env.NEXT_PUBLIC_ASSET_REPO,
|
||||
process.env.PUBLIC_ASSET_REPO,
|
||||
)}/git/trees/main`,
|
||||
).then((response) => response.json())) as GitHubTrees
|
||||
).tree.find(({ path }) => path === 'regions')!.url;
|
||||
|
||||
@@ -12,10 +12,10 @@ export * from './assertSecret';
|
||||
// export * from './discoveredIdDefinitions';
|
||||
// export * from './emblemURL';
|
||||
// export * from './equipmentDefinitions';
|
||||
// export * from './eventManager';
|
||||
export * from './eventManager';
|
||||
// export * from './fetchCdonLz4';
|
||||
// export * from './flagUserActivity';
|
||||
// export * from './gameDefinitions';
|
||||
export * from './gameDefinitions';
|
||||
// export * from './getArchivedLatestSeasonNumber';
|
||||
// export * from './getArchivedRatingInfo';
|
||||
// export * from './getArchivedRatingLeaderboard';
|
||||
@@ -36,8 +36,8 @@ export * from './assertSecret';
|
||||
// export * from './reviews';
|
||||
// export * from './skillDefinitions';
|
||||
// export * from './sum';
|
||||
// export * from './superCompress';
|
||||
// export * from './superDecompress';
|
||||
export * from './superCompress';
|
||||
export * from './superDecompress';
|
||||
// export * from './tankDefinitions';
|
||||
// export * from './tankIcon';
|
||||
// export * from './tankNames';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { deburr } from 'lodash';
|
||||
import { deburr } from 'lodash-es';
|
||||
import { camouflageDefinitions, tankDefinitionsArray } from '.';
|
||||
|
||||
export const tankNames = Promise.all([
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { forEachRight } from 'lodash';
|
||||
import { forEachRight } from 'lodash-es';
|
||||
import { GunDefinition, TurretDefinition } from './tankDefinitions';
|
||||
|
||||
export function uniqueGuns(turrets: TurretDefinition[]) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// export * from './blitz';
|
||||
export * from './blitz';
|
||||
export * from './blitzkit';
|
||||
// export * from './blitzstars';
|
||||
// export * from './databases';
|
||||
|
||||
@@ -3,8 +3,8 @@ import { assertSecret } from '../blitzkit/assertSecret';
|
||||
export function patreonLoginUrl() {
|
||||
const params = new URLSearchParams({
|
||||
response_type: 'code',
|
||||
client_id: assertSecret(process.env.NEXT_PUBLIC_PATREON_CLIENT_ID),
|
||||
redirect_uri: assertSecret(process.env.NEXT_PUBLIC_PATREON_REDIRECT_URI),
|
||||
client_id: assertSecret(process.env.PUBLIC_PATREON_CLIENT_ID),
|
||||
redirect_uri: assertSecret(process.env.PUBLIC_PATREON_REDIRECT_URI),
|
||||
scope: 'identity',
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { ReadStream, WriteStream } from './buffer';
|
||||
|
||||
export enum BkrlFormat {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { ReadStream, WriteStream } from './buffer';
|
||||
|
||||
enum ValueType {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { Vector3Tuple, Vector4Tuple } from 'three';
|
||||
import { WindowsReadStream } from './windows';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { ReadStream, WriteStream } from './buffer';
|
||||
|
||||
export class DidsReadStream extends ReadStream {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { clamp, isEqual, times } from 'lodash';
|
||||
import { clamp, isEqual, times } from 'lodash-es';
|
||||
import { ReadStream } from './buffer';
|
||||
|
||||
export enum PvrFlags {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { IndividualTankStats } from '..';
|
||||
import { BlitzStats } from '../statistics/compositeStats/constants';
|
||||
import { ReadStream, WriteStream } from './buffer';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { ReadStream } from './buffer';
|
||||
|
||||
enum KAType {
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
getTankStats,
|
||||
idToRegion,
|
||||
} from '@blitzkit/core';
|
||||
import { chunk, times } from 'lodash';
|
||||
import { chunk, times } from 'lodash-es';
|
||||
import { commitAssets } from './core/github/commitAssets';
|
||||
import { fetchPreDiscoveredIds } from './core/github/fetchPreDiscoveredIds';
|
||||
|
||||
|
||||
@@ -451,7 +451,7 @@ export async function definitions() {
|
||||
|
||||
const wargamingTankopedia = (await fetch(
|
||||
`https://api.wotblitz.com/wotb/encyclopedia/vehicles/?application_id=${assertSecret(
|
||||
process.env.NEXT_PUBLIC_WARGAMING_APPLICATION_ID,
|
||||
process.env.PUBLIC_WARGAMING_APPLICATION_ID,
|
||||
)}&fields=description`,
|
||||
).then((response) => response.json())) as {
|
||||
data: { [key: number]: { description: null | string } };
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
regionSubdomainToRegion,
|
||||
superCompress,
|
||||
} from '@blitzkit/core';
|
||||
import { chunk } from 'lodash';
|
||||
import { chunk } from 'lodash-es';
|
||||
import { argv } from 'process';
|
||||
import { commitAssets } from './core/github/commitAssets';
|
||||
import { FileChange } from './core/github/commitMultipleFiles';
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
VertexAttribute,
|
||||
} from '@blitzkit/core';
|
||||
import { Accessor, Document, Node, Scene } from '@gltf-transform/core';
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import {
|
||||
vertexAttributeGLTFName,
|
||||
vertexAttributeGltfVectorSizes,
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
VertexAttribute,
|
||||
} from '@blitzkit/core';
|
||||
import { Document, Material, Node, Scene } from '@gltf-transform/core';
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { dirname } from 'path';
|
||||
import { Matrix4, Quaternion, Vector3, Vector4Tuple } from 'three';
|
||||
import { readDVPLFile } from '../readDVPLFile';
|
||||
|
||||
@@ -11,7 +11,7 @@ export class AssetCommit {
|
||||
|
||||
const blob = await createBlob(
|
||||
'tresabhi',
|
||||
assertSecret(process.env.NEXT_PUBLIC_ASSET_REPO),
|
||||
assertSecret(process.env.PUBLIC_ASSET_REPO),
|
||||
{
|
||||
content,
|
||||
encoding,
|
||||
@@ -28,14 +28,14 @@ export class AssetCommit {
|
||||
const latestCommitSha = (
|
||||
await octokit.git.getRef({
|
||||
owner: 'tresabhi',
|
||||
repo: assertSecret(process.env.NEXT_PUBLIC_ASSET_REPO),
|
||||
ref: `heads/${assertSecret(process.env.NEXT_PUBLIC_ASSET_BRANCH)}`,
|
||||
repo: assertSecret(process.env.PUBLIC_ASSET_REPO),
|
||||
ref: `heads/${assertSecret(process.env.PUBLIC_ASSET_BRANCH)}`,
|
||||
})
|
||||
).data.object.sha;
|
||||
const treeSha = (
|
||||
await octokit.git.getCommit({
|
||||
owner: 'tresabhi',
|
||||
repo: assertSecret(process.env.NEXT_PUBLIC_ASSET_REPO),
|
||||
repo: assertSecret(process.env.PUBLIC_ASSET_REPO),
|
||||
commit_sha: latestCommitSha,
|
||||
})
|
||||
).data.tree.sha;
|
||||
@@ -43,21 +43,21 @@ export class AssetCommit {
|
||||
|
||||
const { data: treeData } = await octokit.git.createTree({
|
||||
owner: 'tresabhi',
|
||||
repo: assertSecret(process.env.NEXT_PUBLIC_ASSET_REPO),
|
||||
repo: assertSecret(process.env.PUBLIC_ASSET_REPO),
|
||||
base_tree: treeSha,
|
||||
tree: blobs,
|
||||
});
|
||||
const { data: newCommitData } = await octokit.git.createCommit({
|
||||
owner: 'tresabhi',
|
||||
repo: assertSecret(process.env.NEXT_PUBLIC_ASSET_REPO),
|
||||
repo: assertSecret(process.env.PUBLIC_ASSET_REPO),
|
||||
message: this.message,
|
||||
tree: treeData.sha,
|
||||
parents: [latestCommitSha],
|
||||
});
|
||||
await octokit.git.updateRef({
|
||||
owner: 'tresabhi',
|
||||
repo: assertSecret(process.env.NEXT_PUBLIC_ASSET_REPO),
|
||||
ref: `heads/${assertSecret(process.env.NEXT_PUBLIC_ASSET_BRANCH)}`,
|
||||
repo: assertSecret(process.env.PUBLIC_ASSET_REPO),
|
||||
ref: `heads/${assertSecret(process.env.PUBLIC_ASSET_BRANCH)}`,
|
||||
sha: newCommitData.sha,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ export async function commitAssets(message: string, changes: FileChange[]) {
|
||||
|
||||
await commitMultipleFiles(
|
||||
'tresabhi',
|
||||
assertSecret(process.env.NEXT_PUBLIC_ASSET_REPO),
|
||||
assertSecret(process.env.NEXT_PUBLIC_ASSET_BRANCH),
|
||||
assertSecret(process.env.PUBLIC_ASSET_REPO),
|
||||
assertSecret(process.env.PUBLIC_ASSET_BRANCH),
|
||||
`${message} - ${new Date().toDateString()}`,
|
||||
changes,
|
||||
);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { throttle } from 'lodash';
|
||||
import { throttle } from 'lodash-es';
|
||||
import { FileChange } from './commitMultipleFiles';
|
||||
import { octokit } from './octokit';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
DidsReadStream,
|
||||
DiscoveredIdsDefinitions,
|
||||
} from '@blitzkit/core';
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { decompress } from 'lz4js';
|
||||
import ProgressBar from 'progress';
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
idToRegion,
|
||||
retryAbleBlitzFetchEvent,
|
||||
} from '@blitzkit/core';
|
||||
import { chunk, times, uniq } from 'lodash';
|
||||
import { chunk, times, uniq } from 'lodash-es';
|
||||
import { compress, decompress } from 'lz4js';
|
||||
import { commitAssets } from './core/github/commitAssets';
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
} from '@blitzkit/core';
|
||||
import { readdir } from 'fs/promises';
|
||||
import { google } from 'googleapis';
|
||||
import { cloneDeep, uniqBy } from 'lodash';
|
||||
import { cloneDeep, uniqBy } from 'lodash-es';
|
||||
import { parse as parseYaml } from 'yaml';
|
||||
import { DATA } from './buildAssets/constants';
|
||||
import {
|
||||
@@ -118,7 +118,7 @@ for (const tank of tanksSanitized) {
|
||||
({
|
||||
id: item.id!.videoId!,
|
||||
author: item.snippet!.channelId!,
|
||||
} satisfies Video),
|
||||
}) satisfies Video,
|
||||
),
|
||||
};
|
||||
|
||||
|
||||
@@ -29,8 +29,7 @@
|
||||
"react-fuzzysort": "^1.0.1",
|
||||
"immer": "^10.1.1",
|
||||
"@vanilla-extract/dynamic": "^2.1.2",
|
||||
"zustand": "^4.5.5",
|
||||
"react-promise-suspense": "^0.3.4"
|
||||
"zustand": "^4.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react-dom": "^18",
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import { Flex, Heading, Text } from '@radix-ui/themes';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import { assertSecret, idToRegion } from '@blitzkit/core';
|
||||
import { Button, Flex, Heading, Link, Text } from '@radix-ui/themes';
|
||||
import { usePathname } from 'next/navigation';
|
||||
@@ -78,7 +76,7 @@ export function Checks() {
|
||||
`https://api.worldoftanks.${idToRegion(
|
||||
wargaming.id,
|
||||
)}/wot/auth/prolongate/?application_id=${assertSecret(
|
||||
process.env.NEXT_PUBLIC_WARGAMING_APPLICATION_ID,
|
||||
process.env.PUBLIC_WARGAMING_APPLICATION_ID,
|
||||
)}&access_token=${wargaming.token}`,
|
||||
)
|
||||
.then((response) => response.json() as Promise<Extension>)
|
||||
|
||||
@@ -13,7 +13,7 @@ export default function Page({
|
||||
const markdown = use(
|
||||
fetch(
|
||||
`https://raw.githubusercontent.com/tresabhi/blitzkit/${assertSecret(
|
||||
process.env.NEXT_PUBLIC_ASSET_BRANCH,
|
||||
process.env.PUBLIC_ASSET_BRANCH,
|
||||
)}/docs/${params.directory}/${params.document}.md`,
|
||||
).then((response) => response.text()),
|
||||
);
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import { Flex, Theme } from '@radix-ui/themes';
|
||||
import '@radix-ui/themes/styles.css';
|
||||
import { Roboto_Flex } from 'next/font/google';
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import { DiscordLogoIcon, HomeIcon } from '@radix-ui/react-icons';
|
||||
import { Button, Flex, Heading, Text } from '@radix-ui/themes';
|
||||
import Link from 'next/link';
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { Flex, Heading } from '@radix-ui/themes';
|
||||
import { Hero } from '../../../website/src/components/Hero';
|
||||
import { Plugs } from '../../../website/src/components/Plugs';
|
||||
import { ToolCard } from '../../../website/src/components/ToolCard';
|
||||
import {
|
||||
compareTool,
|
||||
@@ -14,7 +13,6 @@ import {
|
||||
} from '../../../website/src/constants/tools';
|
||||
import { AdMidSectionResponsive } from '../components/AdMidSectionResponsive';
|
||||
import { useAdExempt } from '../hooks/useAdExempt';
|
||||
import { Plugs } from '../../../website/src/components/Plugs';
|
||||
|
||||
export default function Page() {
|
||||
const exempt = useAdExempt();
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import { Flex, Heading, Switch, Text } from '@radix-ui/themes';
|
||||
import { PageWrapper } from '../../components/PageWrapper';
|
||||
import * as App from '../../stores/app';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Heading, Table } from '@radix-ui/themes';
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { StickyColumnHeaderCell } from '../../../../components/StickyColumnHeaderCell';
|
||||
import * as CompareEphemeral from '../../../../stores/compareEphemeral';
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from '@blitzkit/core';
|
||||
import { ComponentPlaceholderIcon } from '@radix-ui/react-icons';
|
||||
import { Button, Flex, Popover, Slider, Table, Text } from '@radix-ui/themes';
|
||||
import { debounce, times } from 'lodash';
|
||||
import { debounce, times } from 'lodash-es';
|
||||
import { use } from 'react';
|
||||
import { BlitzkitButtonGrayIcon } from '../../../../components/BlitzkitButtonGrayIcon';
|
||||
import { ConsumablesManager } from '../../../../components/ConsumablesManager';
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import {
|
||||
createDefaultSkills,
|
||||
equipmentDefinitions,
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
'use client';
|
||||
|
||||
import { Code, Heading } from '@radix-ui/themes';
|
||||
import { useSearchParams } from 'next/navigation';
|
||||
import { useMemo } from 'react';
|
||||
import { PageWrapper } from '../../../../../components/PageWrapper';
|
||||
import {
|
||||
configurations,
|
||||
extractEmbedConfigDefaults,
|
||||
} from '../../../../../../../website/src/constants/embeds';
|
||||
import { PageWrapper } from '../../../../../components/PageWrapper';
|
||||
import * as EmbedState from '../../../../../stores/embedState';
|
||||
|
||||
export interface EmbedPreviewControllerProps {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import { imgur } from '@blitzkit/core';
|
||||
import {
|
||||
CodeIcon,
|
||||
@@ -11,12 +9,12 @@ import {
|
||||
WidthIcon,
|
||||
} from '@radix-ui/react-icons';
|
||||
import { Box, Button, Flex, Heading, ScrollArea, Text } from '@radix-ui/themes';
|
||||
import { capitalize, startCase } from 'lodash';
|
||||
import { capitalize, startCase } from 'lodash-es';
|
||||
import { ReactNode, useEffect, useRef, useState } from 'react';
|
||||
import { stringify } from 'urlon';
|
||||
import { configurations } from '../../../../../../website/src/constants/embeds';
|
||||
import { CopyButton } from '../../../../components/CopyButton';
|
||||
import { PageWrapper } from '../../../../components/PageWrapper';
|
||||
import { configurations } from '../../../../../../website/src/constants/embeds';
|
||||
import * as App from '../../../../stores/app';
|
||||
import * as EmbedState from '../../../../stores/embedState';
|
||||
import { EmbedConfig } from '../../../../stores/embedState';
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import { imgur, ImgurSize } from '@blitzkit/core';
|
||||
import Link from 'next/link';
|
||||
import { usePathname } from 'next/navigation';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Table } from '@radix-ui/themes';
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { RowLoader } from './RowLoader';
|
||||
|
||||
export function BodyLoader() {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import {
|
||||
CaretDownIcon,
|
||||
CaretSortIcon,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
'use client';
|
||||
|
||||
import { averageDefinitions, discoveredIdsDefinitions, formatCompact } from '@blitzkit/core';
|
||||
import {
|
||||
averageDefinitions,
|
||||
discoveredIdsDefinitions,
|
||||
formatCompact,
|
||||
} from '@blitzkit/core';
|
||||
import { InfoCircledIcon } from '@radix-ui/react-icons';
|
||||
import { Callout, Flex } from '@radix-ui/themes';
|
||||
import { use } from 'react';
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import { Flex, Select, Text } from '@radix-ui/themes';
|
||||
import * as TankPerformancePersistent from '../../../../stores/tankPerformancePersistent';
|
||||
import { PlayerCountPeriod } from '../../../../stores/tankPerformancePersistent/constants';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Skeleton, Table } from '@radix-ui/themes';
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { memo, useRef } from 'react';
|
||||
import { useIntersection } from '../../../../hooks/useIntersection';
|
||||
import { TankPerformanceSortTypeNamesArray } from '../../../../stores/tankPerformanceSort/constants';
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import { Flex } from '@radix-ui/themes';
|
||||
import { Suspense } from 'react';
|
||||
import { StickyTableRoot } from '../../../../components/StickyTableRoot';
|
||||
|
||||
@@ -1,19 +1,14 @@
|
||||
'use client';
|
||||
|
||||
import {
|
||||
averageDefinitionsArray,
|
||||
tankDefinitions,
|
||||
} from '@blitzkit/core';
|
||||
import { averageDefinitionsArray, tankDefinitions } from '@blitzkit/core';
|
||||
import { Table } from '@radix-ui/themes';
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { Suspense, use, useEffect, useMemo, useState } from 'react';
|
||||
import { filterTank } from '../../../../core/blitzkit/filterTank';
|
||||
import * as TankFilters from '../../../../stores/tankFilters';
|
||||
import * as TankPerformancePersistent from '../../../../stores/tankPerformancePersistent';
|
||||
import * as TankPerformanceSort from '../../../../stores/tankPerformanceSort';
|
||||
import { RowLoader } from './RowLoader';
|
||||
import { TankRow } from './TankRow';
|
||||
import { Total } from './Total';
|
||||
import { filterTank } from '../../../../core/blitzkit/filterTank';
|
||||
|
||||
const PREVIEW_COUNT = 10;
|
||||
const DEFAULT_LOADED_ROWS = 25;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import {
|
||||
averageDefinitionsArray,
|
||||
formatCompact,
|
||||
@@ -12,7 +10,7 @@ import {
|
||||
import strings from '@blitzkit/core/lang/en-US.json';
|
||||
import { ResponsiveBar } from '@nivo/bar';
|
||||
import { Box, Flex, Heading } from '@radix-ui/themes';
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { use } from 'react';
|
||||
import { nivoTheme } from '../../../../core/nivo/theme';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
SymbolIcon,
|
||||
} from '@radix-ui/react-icons';
|
||||
import { Flex, IconButton, TextField } from '@radix-ui/themes';
|
||||
import { range } from 'lodash';
|
||||
import { range } from 'lodash-es';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { infiniteSpin } from './index.css';
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import {
|
||||
AccountList,
|
||||
AccountListItem,
|
||||
@@ -33,7 +31,7 @@ import {
|
||||
TextField,
|
||||
} from '@radix-ui/themes';
|
||||
import { produce } from 'immer';
|
||||
import { debounce, range } from 'lodash';
|
||||
import { debounce, range } from 'lodash-es';
|
||||
import { ChangeEvent, useEffect, useRef, useState } from 'react';
|
||||
import { create } from 'zustand';
|
||||
import { PageWrapper } from '../../../components/PageWrapper';
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import {
|
||||
AccountListWithServer,
|
||||
IndividualAccountInfo,
|
||||
@@ -37,7 +35,7 @@ import {
|
||||
Text,
|
||||
TextField,
|
||||
} from '@radix-ui/themes';
|
||||
import { debounce } from 'lodash';
|
||||
import { debounce } from 'lodash-es';
|
||||
import { use, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { PageWrapper } from '../../../components/PageWrapper';
|
||||
import { TankRowHeaderCell } from '../../../components/TankRowHeaderCell';
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
import { asset } from '@blitzkit/core';
|
||||
import { Flex, Heading, Slider, TextField } from '@radix-ui/themes';
|
||||
import { clamp, debounce } from 'lodash';
|
||||
import { clamp, debounce } from 'lodash-es';
|
||||
import { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { GenericTankComponentButton } from '../../../../../../../components/ModuleButtons/GenericTankComponentButton';
|
||||
import * as Duel from '../../../../../../../stores/duel';
|
||||
@@ -61,10 +61,10 @@ export function Miscellaneous() {
|
||||
cooldownBooster === 0
|
||||
? undefined
|
||||
: cooldownBooster === 1
|
||||
? '#afb0abc0'
|
||||
: cooldownBooster === 2
|
||||
? '#5f72cbc0'
|
||||
: '#9b3cc0c0'
|
||||
? '#afb0abc0'
|
||||
: cooldownBooster === 2
|
||||
? '#5f72cbc0'
|
||||
: '#9b3cc0c0'
|
||||
}
|
||||
iconStyles={{
|
||||
transform: 'translate(-50%, -50%) scale(0.8)',
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import {
|
||||
TextField,
|
||||
Tooltip,
|
||||
} from '@radix-ui/themes';
|
||||
import { debounce } from 'lodash';
|
||||
import { debounce } from 'lodash-es';
|
||||
import { Fragment, use, useEffect, useRef, useState } from 'react';
|
||||
import { lerp } from 'three/src/math/MathUtils';
|
||||
import { Ad, AdType } from '../../../../../../components/Ad';
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import { TIER_ROMAN_NUMERALS } from '@blitzkit/core';
|
||||
import strings from '@blitzkit/core/lang/en-US.json';
|
||||
import { invalidate } from '@react-three/fiber';
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { StarsInt } from '@blitzkit/core';
|
||||
import { Flex, Text, TextProps } from '@radix-ui/themes';
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { PartialStar } from './components/PartialStar';
|
||||
|
||||
type StarsProps = TextProps & {
|
||||
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import { formatCompact } from '@blitzkit/core';
|
||||
import { Flex, Heading, Skeleton, Text } from '@radix-ui/themes';
|
||||
import { memo } from 'react';
|
||||
|
||||
+3
-4
@@ -51,8 +51,7 @@ export function MetaSection() {
|
||||
</Button>
|
||||
</Link>
|
||||
|
||||
{assertSecret(process.env.NEXT_PUBLIC_PROMOTE_OPENTEST) ===
|
||||
'true' && (
|
||||
{assertSecret(process.env.PUBLIC_PROMOTE_OPENTEST) === 'true' && (
|
||||
<Link
|
||||
href={`https://opentest.blitzkit.app/tools/tankopedia/${protagonist.id}`}
|
||||
>
|
||||
@@ -134,8 +133,8 @@ export function MetaSection() {
|
||||
protagonist.treeType === 'collector'
|
||||
? 'blue'
|
||||
: protagonist.treeType === 'premium'
|
||||
? 'amber'
|
||||
: undefined
|
||||
? 'amber'
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
{strings.common.tree_type[protagonist.treeType]}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useFrame, useLoader } from '@react-three/fiber';
|
||||
import { clamp } from 'lodash';
|
||||
import { clamp } from 'lodash-es';
|
||||
import { useRef } from 'react';
|
||||
import { MeshStandardMaterial, TextureLoader } from 'three';
|
||||
import * as TankopediaPersistent from '../../../../../stores/tankopediaPersistent';
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import { TIER_ROMAN_NUMERALS } from '@blitzkit/core';
|
||||
import strings from '@blitzkit/core/lang/en-US.json';
|
||||
import { invalidate } from '@react-three/fiber';
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import {
|
||||
asset,
|
||||
gameDefinitions,
|
||||
@@ -10,7 +8,7 @@ import {
|
||||
import strings from '@blitzkit/core/lang/en-US.json';
|
||||
import { ReloadIcon } from '@radix-ui/react-icons';
|
||||
import { Box, Flex, IconButton, Text, Tooltip } from '@radix-ui/themes';
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { use } from 'react';
|
||||
import { classIcons } from '../../../../components/ClassIcon';
|
||||
import { ExperimentIcon } from '../../../../components/ExperimentIcon';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { TankDefinition } from '@blitzkit/core';
|
||||
import { type TankDefinition } from '@blitzkit/core';
|
||||
import { CaretRightIcon } from '@radix-ui/react-icons';
|
||||
import { Button, Link, TextField } from '@radix-ui/themes';
|
||||
import * as TankFilters from '../../../../stores/tankFilters';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { TankDefinition } from '@blitzkit/core';
|
||||
import { MagnifyingGlassIcon } from '@radix-ui/react-icons';
|
||||
import { Flex, Spinner, TextField } from '@radix-ui/themes';
|
||||
import { debounce } from 'lodash';
|
||||
import { debounce } from 'lodash-es';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { KeyboardEventHandler, useCallback, useRef } from 'react';
|
||||
import * as TankFilters from '../../../../stores/tankFilters';
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import {
|
||||
TANK_CLASSES,
|
||||
TankDefinition,
|
||||
@@ -15,7 +13,7 @@ import {
|
||||
} from '@blitzkit/core';
|
||||
import { Callout, Flex, FlexProps, Link, Text } from '@radix-ui/themes';
|
||||
import { go } from 'fuzzysort';
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { Fragment, memo, use, useEffect, useMemo, useState } from 'react';
|
||||
import { AdMidSectionResponsive } from '../../../../../components/AdMidSectionResponsive';
|
||||
import { ExperimentIcon } from '../../../../../components/ExperimentIcon';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Tier, TIER_ROMAN_NUMERALS } from '@blitzkit/core';
|
||||
import { Flex, IconButton, Text } from '@radix-ui/themes';
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { memo } from 'react';
|
||||
import * as TankFilters from '../../../../stores/tankFilters';
|
||||
import * as TankopediaSort from '../../../../stores/tankopediaSort';
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
"@astrojs/check": "^0.9.3",
|
||||
"@astrojs/react": "^3.6.2",
|
||||
"@blitzkit/core": "workspace:*",
|
||||
"@nanostores/persistent": "^0.10.2",
|
||||
"@nanostores/react": "^0.7.3",
|
||||
"@radix-ui/react-icons": "^1.3.0",
|
||||
"@radix-ui/themes": "^3.1.3",
|
||||
"@vanilla-extract/css": "^1.15.5",
|
||||
@@ -20,7 +22,8 @@
|
||||
"nanostores": "^0.11.3",
|
||||
"purgecss": "^6.0.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1"
|
||||
"react-dom": "^18.3.1",
|
||||
"react-promise-suspense": "^0.3.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vanilla-extract/vite-plugin": "^4.0.15"
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { imgur } from '@blitzkit/core';
|
||||
import { Box, BoxProps, Text } from '@radix-ui/themes';
|
||||
import { uniqueId } from 'lodash';
|
||||
import { uniqueId } from 'lodash-es';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { Vector2Tuple } from 'three';
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import { J_HAT, K_HAT } from '@blitzkit/core';
|
||||
import { Box, Flex, Text } from '@radix-ui/themes';
|
||||
import { Html } from '@react-three/drei';
|
||||
import { useFrame } from '@react-three/fiber';
|
||||
import { clamp } from 'lodash';
|
||||
import { ComponentProps, useEffect, useRef } from 'react';
|
||||
import { clamp } from 'lodash-es';
|
||||
import { type ComponentProps, useEffect, useRef } from 'react';
|
||||
import {
|
||||
BufferGeometry,
|
||||
DoubleSide,
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
Separator,
|
||||
Text,
|
||||
} from '@radix-ui/themes';
|
||||
import { ComponentProps } from 'react';
|
||||
import type { ComponentProps } from 'react';
|
||||
import { radToDeg } from 'three/src/math/MathUtils';
|
||||
import * as TankopediaEphemeral from '../../../../../website-legacy/src/stores/tankopediaEphemeral';
|
||||
import { shotStatusColors } from './ShotDisplay';
|
||||
|
||||
+4
-7
@@ -1,5 +1,5 @@
|
||||
import {
|
||||
ShellType,
|
||||
type ShellType,
|
||||
isExplosive,
|
||||
resolveNearPenetration,
|
||||
resolvePenetrationCoefficient,
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
import { useThree } from '@react-three/fiber';
|
||||
import { useCallback } from 'react';
|
||||
import {
|
||||
Intersection,
|
||||
type Intersection,
|
||||
MeshBasicMaterial,
|
||||
Object3D,
|
||||
Plane,
|
||||
@@ -17,11 +17,8 @@ import {
|
||||
Vector3,
|
||||
} from 'three';
|
||||
import { degToRad } from 'three/src/math/MathUtils';
|
||||
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 * as Duel from '../../../../stores/duel';
|
||||
import * as TankopediaEphemeral from '../../../../stores/tankopediaEphemeral';
|
||||
import { ArmorType } from '../SpacedArmorScene';
|
||||
import { SpacedArmorSubExternal } from './components/SpacedArmorSubExternal';
|
||||
import { SpacedArmorSubSpaced } from './components/SpacedArmorSubSpaced';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { I_HAT, J_HAT } from '@blitzkit/core';
|
||||
import { MeshProps, useThree } from '@react-three/fiber';
|
||||
import { clamp } from 'lodash';
|
||||
import { clamp } from 'lodash-es';
|
||||
import { useEffect, useMemo } from 'react';
|
||||
import {
|
||||
Box3,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ComponentProps } from 'react';
|
||||
import type { ComponentProps } from 'react';
|
||||
|
||||
export function BlitzkitButtonGrayIcon(props: ComponentProps<'svg'>) {
|
||||
return (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ComponentProps } from 'react';
|
||||
import type { ComponentProps } from 'react';
|
||||
|
||||
export function ClassHeavy(props: ComponentProps<'svg'>) {
|
||||
return (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ComponentProps } from 'react';
|
||||
import type { ComponentProps } from 'react';
|
||||
|
||||
export function ClassLight(props: ComponentProps<'svg'>) {
|
||||
return (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ComponentProps } from 'react';
|
||||
import type { ComponentProps } from 'react';
|
||||
|
||||
export function ClassMedium(props: ComponentProps<'svg'>) {
|
||||
return (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ComponentProps } from 'react';
|
||||
import type { ComponentProps } from 'react';
|
||||
|
||||
export function ClassTankDestroyer(props: ComponentProps<'svg'>) {
|
||||
return (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { TankClass } from '@blitzkit/core';
|
||||
import { ComponentProps, ReactNode } from 'react';
|
||||
import { type TankClass } from '@blitzkit/core';
|
||||
import type { ComponentProps, ReactNode } from 'react';
|
||||
import { ClassHeavy } from './components/ClassHeavy';
|
||||
import { ClassLight } from './components/ClassLight';
|
||||
import { ClassMedium } from './components/ClassMedium';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Button, ButtonProps, Tooltip } from '@radix-ui/themes';
|
||||
import { Button, type ButtonProps, Tooltip } from '@radix-ui/themes';
|
||||
import { useState } from 'react';
|
||||
|
||||
interface CopyButtonProps extends ButtonProps {
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
Popover,
|
||||
Text,
|
||||
} from '@radix-ui/themes';
|
||||
import { times } from 'lodash';
|
||||
import { times } from 'lodash-es';
|
||||
import { useState } from 'react';
|
||||
|
||||
const DAY_TITLES = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Link, LinkProps } from '@radix-ui/themes';
|
||||
import { Link, type LinkProps } from '@radix-ui/themes';
|
||||
|
||||
export function DummyLink({ href = '#', onClick, ...props }: LinkProps) {
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { EquipmentPreset } from '@blitzkit/core';
|
||||
import { Flex } from '@radix-ui/themes';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import { EquipmentMatrix } from '../../../website-legacy/src/stores/duel';
|
||||
import { EquipmentButton } from './ModuleButtons/EquipmentButton';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ComponentProps } from 'react';
|
||||
import type { ComponentProps } from 'react';
|
||||
|
||||
export function ExperimentIcon(props: ComponentProps<'svg'>) {
|
||||
return (
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
---
|
||||
import { gameDefinitions } from '@blitzkit/core';
|
||||
import { Code, Flex, Heading, Link, Text } from '@radix-ui/themes';
|
||||
import packageJson from '../../../../package.json';
|
||||
|
||||
const awaitedGameDefinitions = await gameDefinitions;
|
||||
---
|
||||
|
||||
<Flex
|
||||
gap="6"
|
||||
p="6"
|
||||
direction="column"
|
||||
align="center"
|
||||
style={{ backgroundColor: 'var(--color-panel)' }}
|
||||
>
|
||||
<Flex
|
||||
align="center"
|
||||
justify="between"
|
||||
maxWidth="40rem"
|
||||
width="100%"
|
||||
flexGrow="1"
|
||||
gap="5"
|
||||
position="relative"
|
||||
direction={{ initial: 'column', sm: 'row' }}
|
||||
>
|
||||
<Flex
|
||||
direction="column"
|
||||
align={{
|
||||
initial: 'center',
|
||||
sm: 'start',
|
||||
}}
|
||||
>
|
||||
<Heading>BlitzKit </Heading>
|
||||
<Text color="gray">Everything World of Tanks Blitz</Text>
|
||||
<Text size="1" color="gray">
|
||||
Unaffiliated with Wargaming or any service
|
||||
</Text>
|
||||
</Flex>
|
||||
|
||||
<Flex
|
||||
gap="6"
|
||||
width={{
|
||||
initial: '100%',
|
||||
sm: 'auto',
|
||||
}}
|
||||
>
|
||||
<Flex
|
||||
direction="column"
|
||||
gap="1"
|
||||
align={{
|
||||
initial: 'end',
|
||||
sm: 'start',
|
||||
}}
|
||||
flexGrow={{
|
||||
initial: '1',
|
||||
sm: '0',
|
||||
}}
|
||||
flexBasis={{
|
||||
initial: '0',
|
||||
sm: 'auto',
|
||||
}}
|
||||
>
|
||||
<Heading size="3">About</Heading>
|
||||
<Flex
|
||||
direction="column"
|
||||
align={{
|
||||
initial: 'end',
|
||||
sm: 'start',
|
||||
}}
|
||||
>
|
||||
<Link href="/docs/about/credits" color="gray"> Credits </Link>
|
||||
<Link
|
||||
href="https://discord.gg/nDt7AjGJQH"
|
||||
target="_blank"
|
||||
color="gray"
|
||||
>
|
||||
Discord
|
||||
</Link>
|
||||
<Link
|
||||
href="https://github.com/tresabhi/blitzkit"
|
||||
target="_blank"
|
||||
color="gray"
|
||||
>
|
||||
GitHub
|
||||
</Link>
|
||||
<Link href="/docs/patches" color="gray"> Patches </Link>
|
||||
|
||||
{/* patreon supporters? */}
|
||||
</Flex>
|
||||
</Flex>
|
||||
|
||||
<Flex
|
||||
direction="column"
|
||||
gap="1"
|
||||
flexGrow={{
|
||||
initial: '1',
|
||||
sm: '0',
|
||||
}}
|
||||
flexBasis={{
|
||||
initial: '0',
|
||||
sm: 'auto',
|
||||
}}
|
||||
>
|
||||
<Heading size="3">Legal</Heading>
|
||||
<Flex direction="column">
|
||||
<Link href="/docs/legal/privacy-policy" color="gray">
|
||||
Privacy policy
|
||||
</Link>
|
||||
<Link href="/docs/legal/terms-of-service" color="gray">
|
||||
Terms of service
|
||||
</Link>
|
||||
<Link
|
||||
href="https://www.google.com/settings/ads"
|
||||
target="_blank"
|
||||
color="gray"
|
||||
>
|
||||
Ad settings
|
||||
</Link>
|
||||
</Flex>
|
||||
</Flex>
|
||||
</Flex>
|
||||
</Flex>
|
||||
|
||||
<Flex gap="5" display={{ initial: 'flex', sm: 'none' }}>
|
||||
<Flex direction="column" justify="between" align="end">
|
||||
<Text size="2" color="gray"> BlitzKit </Text>
|
||||
<Text size="2" color="gray"> WoT Blitz </Text>
|
||||
<Text size="2" color="gray"> CDN </Text>
|
||||
</Flex>
|
||||
|
||||
<Flex direction="column" justify="between" align="start">
|
||||
<Code size="2" color="gray">
|
||||
{packageJson.version}
|
||||
</Code>
|
||||
<Code size="2" color="gray">
|
||||
{awaitedGameDefinitions.version}
|
||||
</Code>
|
||||
<Code size="2" color="gray">
|
||||
{process.env.PUBLIC_ASSET_BRANCH}
|
||||
</Code>
|
||||
</Flex>
|
||||
</Flex>
|
||||
|
||||
<Flex gap="2" align="center" display={{ initial: 'none', sm: 'flex' }}>
|
||||
<Text size="2" color="gray"> BlitzKit </Text>
|
||||
<Code size="2" color="gray">
|
||||
{packageJson.version}
|
||||
</Code>
|
||||
<Text size="2" color="gray"> WoT Blitz </Text>
|
||||
<Code size="2" color="gray">
|
||||
{awaitedGameDefinitions.version}
|
||||
</Code>
|
||||
<Text size="2" color="gray"> CDN </Text>
|
||||
<Code size="2" color="gray">
|
||||
{process.env.PUBLIC_ASSET_BRANCH}
|
||||
</Code>
|
||||
</Flex>
|
||||
</Flex>
|
||||
Loaded 100 of 146 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user