mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: update to new asset format
This commit is contained in:
1 parent
965d36cdc5
commit
7bde92c7f1
5 files changed
+11
-11
No files matched your search
@@ -103,7 +103,7 @@ Promise.all(
|
||||
? 'collector'
|
||||
: isPremium
|
||||
? 'premium'
|
||||
: 'tech-tree',
|
||||
: 'researchable',
|
||||
tier,
|
||||
type,
|
||||
};
|
||||
@@ -182,7 +182,7 @@ Promise.all(
|
||||
return {
|
||||
content,
|
||||
encoding: 'base64',
|
||||
path: `flags/${name}.webp`,
|
||||
path: `flags/scratched/${name}.webp`,
|
||||
} satisfies FileChange;
|
||||
}),
|
||||
),
|
||||
|
||||
@@ -142,7 +142,7 @@ export default function Page() {
|
||||
{tank.nation !== 'other' && (
|
||||
<img
|
||||
className={styles.flag}
|
||||
src={asset(`flags/${tank.nation}.webp`)}
|
||||
src={asset(`flags/scratched/${tank.nation}.webp`)}
|
||||
style={{
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
@@ -213,7 +213,7 @@ export default function Page() {
|
||||
weight="medium"
|
||||
style={{
|
||||
color:
|
||||
tank.tree_type === 'tech-tree'
|
||||
tank.tree_type === 'researchable'
|
||||
? slateDark.slate12
|
||||
: undefined,
|
||||
}}
|
||||
|
||||
@@ -19,19 +19,19 @@ export const TANK_TYPES = [
|
||||
] as const;
|
||||
|
||||
// TODO: remove hyphen for underscore
|
||||
export const TREE_TYPES = ['tech-tree', 'premium', 'collector'] as const;
|
||||
export const TREE_TYPES = ['researchable', 'premium', 'collector'] as const;
|
||||
|
||||
export type TankType = (typeof TANK_TYPES)[number];
|
||||
export type TreeTypeString = (typeof TREE_TYPES)[number];
|
||||
|
||||
export const TREE_TYPE_NAMES: Record<TreeTypeString, string> = {
|
||||
'tech-tree': 'Tech tree',
|
||||
researchable: 'Tech tree',
|
||||
premium: 'Premium',
|
||||
collector: 'Collector',
|
||||
};
|
||||
|
||||
export const TREE_TYPE_IMAGES: Record<TreeTypeString, string> = {
|
||||
'tech-tree': 'https://i.imgur.com/pJxO2XY.png',
|
||||
researchable: 'https://i.imgur.com/pJxO2XY.png',
|
||||
premium: 'https://i.imgur.com/mZzSwOU.png',
|
||||
collector: 'https://i.imgur.com/7A0RsG5.png',
|
||||
};
|
||||
|
||||
@@ -55,8 +55,8 @@ export default async function addFilterOptions<
|
||||
.setDescription('Tech tree type')
|
||||
.addChoices(
|
||||
{
|
||||
name: TREE_TYPE_NAMES['tech-tree'],
|
||||
value: 'tech-tree' satisfies TreeTypeString,
|
||||
name: TREE_TYPE_NAMES['researchable'],
|
||||
value: 'researchable' satisfies TreeTypeString,
|
||||
},
|
||||
{
|
||||
name: TREE_TYPE_NAMES.premium,
|
||||
|
||||
@@ -33,8 +33,8 @@ export async function filterStats(
|
||||
(filters.treeType === undefined ||
|
||||
(filters.treeType === 'collector' && entry.tree_type === 'collector') ||
|
||||
(filters.treeType === 'premium' && entry.tree_type === 'premium') ||
|
||||
(filters.treeType === 'tech-tree' &&
|
||||
entry.tree_type === 'tech-tree')) &&
|
||||
(filters.treeType === 'researchable' &&
|
||||
entry.tree_type === 'researchable')) &&
|
||||
(filters.tank === undefined || entry.id === filters.tank)
|
||||
);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user