mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: legacy
This commit is contained in:
1 parent
9640920863
commit
8d9ca3d716
271 files changed
+1
-1
No files matched your search
@@ -1,98 +0,0 @@
|
||||
import { CompositeStatsKey } from '@blitzkit/core';
|
||||
import { grayA, grayDark, grayDarkA } from '@radix-ui/colors';
|
||||
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';
|
||||
|
||||
export const breakdownConfig = {
|
||||
width: { type: EmbedItemType.Slider, default: 320, min: 128, max: 640 },
|
||||
height: { type: EmbedItemType.Slider, default: 492, min: 128, max: 1024 },
|
||||
|
||||
showTotal: { type: EmbedItemType.Boolean, default: true, pad: true },
|
||||
|
||||
listGap: { type: EmbedItemType.Size, default: '2' },
|
||||
listMaxTanks: {
|
||||
type: EmbedItemType.Slider,
|
||||
default: 4,
|
||||
min: 0,
|
||||
max: 8,
|
||||
pad: true,
|
||||
},
|
||||
|
||||
cardRadius: { type: EmbedItemType.Radius, default: '2' },
|
||||
cardHeaderBackgroundColor: {
|
||||
type: EmbedItemType.Color,
|
||||
default: grayDarkA.grayA3,
|
||||
},
|
||||
cardHeaderPadding: { type: EmbedItemType.Size, default: '1' },
|
||||
cardTitle: {
|
||||
type: EmbedItemType.RichText,
|
||||
default: { color: grayDark.gray12, weight: 'bold', size: '3' },
|
||||
},
|
||||
cardTitleTypeColor: { type: EmbedItemType.Boolean, default: true },
|
||||
cardTitleClassIcon: { type: EmbedItemType.Boolean, default: true },
|
||||
cardBodyBackgroundColor: {
|
||||
type: EmbedItemType.Color,
|
||||
default: grayA.grayA11,
|
||||
},
|
||||
cardBodyPadding: {
|
||||
type: EmbedItemType.Size,
|
||||
default: '2',
|
||||
pad: true,
|
||||
},
|
||||
|
||||
columnGap: { type: EmbedItemType.Size, default: '0' },
|
||||
columnValue: {
|
||||
type: EmbedItemType.RichText,
|
||||
default: { color: grayDark.gray12, size: '3', weight: 'regular' },
|
||||
},
|
||||
columnLabel: {
|
||||
type: EmbedItemType.RichText,
|
||||
default: { color: grayDark.gray11, size: '2', weight: 'regular' },
|
||||
pad: true,
|
||||
},
|
||||
|
||||
column1: {
|
||||
type: EmbedItemType.Enum,
|
||||
default: 'cumulative_battles' satisfies CompositeStatsKey,
|
||||
options: compositeStatsKeysOptions,
|
||||
},
|
||||
column2: {
|
||||
type: EmbedItemType.Enum,
|
||||
default: 'normalized_wins' satisfies CompositeStatsKey,
|
||||
options: compositeStatsKeysOptions,
|
||||
},
|
||||
column3: {
|
||||
type: EmbedItemType.Enum,
|
||||
default: 'cumulative_wn8' satisfies CompositeStatsKey,
|
||||
options: compositeStatsKeysOptions,
|
||||
},
|
||||
column4: {
|
||||
type: EmbedItemType.Enum,
|
||||
default: 'normalized_damage_dealt' satisfies CompositeStatsKey,
|
||||
options: compositeStatsKeysOptions,
|
||||
},
|
||||
column1CustomLabel: { type: EmbedItemType.String, default: '' },
|
||||
column2CustomLabel: { type: EmbedItemType.String, default: '' },
|
||||
column3CustomLabel: { type: EmbedItemType.String, default: '' },
|
||||
column4CustomLabel: { type: EmbedItemType.String, default: '' },
|
||||
} satisfies EmbedConfig;
|
||||
|
||||
export const configurations = {
|
||||
breakdown: breakdownConfig,
|
||||
} satisfies Record<string, EmbedConfig>;
|
||||
|
||||
export const previews = {
|
||||
breakdown: BreakdownPreview,
|
||||
} satisfies Record<string, () => ReactNode>;
|
||||
export function extractEmbedConfigDefaults<Config extends EmbedConfig>(
|
||||
config: Config,
|
||||
) {
|
||||
return Object.fromEntries(
|
||||
Object.entries(config).map(([key, value]) => [key, value.default]),
|
||||
) as ExtractEmbedConfigTypes<Config>;
|
||||
}
|
||||
@@ -1,160 +0,0 @@
|
||||
import { Button } from '@radix-ui/themes';
|
||||
import { ComponentProps } from 'react';
|
||||
|
||||
export interface Tool {
|
||||
id: string;
|
||||
image: string;
|
||||
title: string;
|
||||
description: string;
|
||||
disabled?: boolean;
|
||||
href?: string;
|
||||
pageDescription?: string;
|
||||
button: {
|
||||
highContrast?: boolean;
|
||||
text: string;
|
||||
color: ComponentProps<typeof Button>['color'];
|
||||
};
|
||||
significant?: boolean;
|
||||
branches?: string[];
|
||||
}
|
||||
|
||||
export const tankopediaTool: Tool = {
|
||||
id: 'tankopedia',
|
||||
title: 'Tankopedia',
|
||||
description: 'Blitz tank encyclopedia',
|
||||
pageDescription:
|
||||
'Statistics, armor, and more for all tanks in World of Tanks Blitz',
|
||||
image: 'D8j6GZx',
|
||||
button: {
|
||||
text: 'Find your tank',
|
||||
color: 'purple',
|
||||
},
|
||||
significant: true,
|
||||
branches: ['main', 'dev', 'opentest'],
|
||||
};
|
||||
|
||||
export const ratingTool: Tool = {
|
||||
id: 'rating',
|
||||
title: 'Rating',
|
||||
description: 'Full rating leaderboard',
|
||||
pageDescription:
|
||||
'Live and archived full rating leaderboard for World of Tanks Blitz',
|
||||
image: 'WEyMZH3',
|
||||
button: {
|
||||
text: 'View leaderboard',
|
||||
color: 'orange',
|
||||
},
|
||||
branches: ['main', 'dev'],
|
||||
};
|
||||
|
||||
export const compareTool: Tool = {
|
||||
id: 'compare',
|
||||
title: 'Compare',
|
||||
description: 'Compare tank statistics',
|
||||
pageDescription:
|
||||
'Compare tanks statistics and loadouts in World of Tanks Blitz',
|
||||
image: 'O6VNl6e',
|
||||
button: {
|
||||
text: 'Compare tanks',
|
||||
color: 'crimson',
|
||||
},
|
||||
branches: ['main', 'dev', 'opentest'],
|
||||
};
|
||||
|
||||
export const sessionTool: Tool = {
|
||||
// TODO: rename to tracker
|
||||
id: 'session',
|
||||
title: 'Session',
|
||||
description: 'Live session stats',
|
||||
pageDescription:
|
||||
'Track your stats in real time as you play World of Tanks Blitz',
|
||||
image: 'HdG9sTf',
|
||||
button: {
|
||||
text: 'Start tracking',
|
||||
color: 'blue',
|
||||
},
|
||||
branches: ['main', 'dev'],
|
||||
};
|
||||
|
||||
export const discordTool: Tool = {
|
||||
id: 'discord',
|
||||
title: 'Discord bot',
|
||||
description: 'Stats right in Discord',
|
||||
href: 'https://discord.com/application-directory/1097673957865443370',
|
||||
image: '0bWE5hC',
|
||||
button: {
|
||||
text: 'Install now',
|
||||
color: 'indigo',
|
||||
},
|
||||
};
|
||||
|
||||
export const moreTool: Tool = {
|
||||
id: 'more',
|
||||
title: 'More coming soon',
|
||||
description: "What we're making",
|
||||
href: 'https://discord.gg/nDt7AjGJQH',
|
||||
image: '1nPm6VI',
|
||||
button: {
|
||||
text: 'Join Discord',
|
||||
color: 'plum',
|
||||
},
|
||||
};
|
||||
|
||||
export const playerStatsTool: Tool = {
|
||||
id: 'player-stats',
|
||||
title: 'Player stats',
|
||||
description: 'Periodical player statistics',
|
||||
pageDescription: 'Periodical player statistics in World of Tanks Blitz',
|
||||
button: {
|
||||
text: 'Lookup player',
|
||||
color: 'blue',
|
||||
},
|
||||
image: 'YelSOfT',
|
||||
href: '_', // TODO: remove this to re-enable link
|
||||
branches: ['main', 'dev'],
|
||||
};
|
||||
|
||||
export const tankPerformanceTool: Tool = {
|
||||
id: 'performance',
|
||||
title: 'Performance',
|
||||
description: 'Tank performance statistics',
|
||||
pageDescription: 'Best tanks and their performances in World of Tanks Blitz',
|
||||
button: {
|
||||
text: 'View tanks',
|
||||
color: 'jade',
|
||||
},
|
||||
image: 'vOKFB03',
|
||||
branches: ['main', 'dev'],
|
||||
};
|
||||
|
||||
export const embedTool: Tool = {
|
||||
id: 'embed',
|
||||
title: 'Embed',
|
||||
description: 'Embeds for streaming',
|
||||
pageDescription:
|
||||
'Create embeds for streaming World of Tanks Blitz with extreme customization',
|
||||
button: {
|
||||
text: 'Create',
|
||||
color: 'red',
|
||||
},
|
||||
image: 'Q0faRYg',
|
||||
branches: ['main', 'dev', 'opentest'],
|
||||
href: '',
|
||||
};
|
||||
|
||||
export const homeTool: Tool = {
|
||||
id: '',
|
||||
title: 'Home',
|
||||
button: { color: 'blue', text: '' },
|
||||
description: '',
|
||||
image: 'rUPie9G',
|
||||
};
|
||||
|
||||
export const TOOLS: Tool[] = [
|
||||
tankopediaTool,
|
||||
compareTool,
|
||||
tankPerformanceTool,
|
||||
sessionTool,
|
||||
embedTool,
|
||||
ratingTool,
|
||||
];
|
||||
Reference in new issue
Block a user