mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-27 20:49:52 +01: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'
|
? 'collector'
|
||||||
: isPremium
|
: isPremium
|
||||||
? 'premium'
|
? 'premium'
|
||||||
: 'tech-tree',
|
: 'researchable',
|
||||||
tier,
|
tier,
|
||||||
type,
|
type,
|
||||||
};
|
};
|
||||||
@@ -182,7 +182,7 @@ Promise.all(
|
|||||||
return {
|
return {
|
||||||
content,
|
content,
|
||||||
encoding: 'base64',
|
encoding: 'base64',
|
||||||
path: `flags/${name}.webp`,
|
path: `flags/scratched/${name}.webp`,
|
||||||
} satisfies FileChange;
|
} satisfies FileChange;
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ export default function Page() {
|
|||||||
{tank.nation !== 'other' && (
|
{tank.nation !== 'other' && (
|
||||||
<img
|
<img
|
||||||
className={styles.flag}
|
className={styles.flag}
|
||||||
src={asset(`flags/${tank.nation}.webp`)}
|
src={asset(`flags/scratched/${tank.nation}.webp`)}
|
||||||
style={{
|
style={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
@@ -213,7 +213,7 @@ export default function Page() {
|
|||||||
weight="medium"
|
weight="medium"
|
||||||
style={{
|
style={{
|
||||||
color:
|
color:
|
||||||
tank.tree_type === 'tech-tree'
|
tank.tree_type === 'researchable'
|
||||||
? slateDark.slate12
|
? slateDark.slate12
|
||||||
: undefined,
|
: undefined,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -19,19 +19,19 @@ export const TANK_TYPES = [
|
|||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
// TODO: remove hyphen for underscore
|
// 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 TankType = (typeof TANK_TYPES)[number];
|
||||||
export type TreeTypeString = (typeof TREE_TYPES)[number];
|
export type TreeTypeString = (typeof TREE_TYPES)[number];
|
||||||
|
|
||||||
export const TREE_TYPE_NAMES: Record<TreeTypeString, string> = {
|
export const TREE_TYPE_NAMES: Record<TreeTypeString, string> = {
|
||||||
'tech-tree': 'Tech tree',
|
researchable: 'Tech tree',
|
||||||
premium: 'Premium',
|
premium: 'Premium',
|
||||||
collector: 'Collector',
|
collector: 'Collector',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const TREE_TYPE_IMAGES: Record<TreeTypeString, string> = {
|
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',
|
premium: 'https://i.imgur.com/mZzSwOU.png',
|
||||||
collector: 'https://i.imgur.com/7A0RsG5.png',
|
collector: 'https://i.imgur.com/7A0RsG5.png',
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ export default async function addFilterOptions<
|
|||||||
.setDescription('Tech tree type')
|
.setDescription('Tech tree type')
|
||||||
.addChoices(
|
.addChoices(
|
||||||
{
|
{
|
||||||
name: TREE_TYPE_NAMES['tech-tree'],
|
name: TREE_TYPE_NAMES['researchable'],
|
||||||
value: 'tech-tree' satisfies TreeTypeString,
|
value: 'researchable' satisfies TreeTypeString,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: TREE_TYPE_NAMES.premium,
|
name: TREE_TYPE_NAMES.premium,
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ export async function filterStats(
|
|||||||
(filters.treeType === undefined ||
|
(filters.treeType === undefined ||
|
||||||
(filters.treeType === 'collector' && entry.tree_type === 'collector') ||
|
(filters.treeType === 'collector' && entry.tree_type === 'collector') ||
|
||||||
(filters.treeType === 'premium' && entry.tree_type === 'premium') ||
|
(filters.treeType === 'premium' && entry.tree_type === 'premium') ||
|
||||||
(filters.treeType === 'tech-tree' &&
|
(filters.treeType === 'researchable' &&
|
||||||
entry.tree_type === 'tech-tree')) &&
|
entry.tree_type === 'researchable')) &&
|
||||||
(filters.tank === undefined || entry.id === filters.tank)
|
(filters.tank === undefined || entry.id === filters.tank)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user