mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
clean tools
This commit is contained in:
1 parent
f355cb9f76
commit
bea55f1b6c
2 files changed
+7
-37
No files matched your search
@@ -35,11 +35,11 @@ export default defineConfig({
|
|||||||
|
|
||||||
version: packageJSON.version,
|
version: packageJSON.version,
|
||||||
|
|
||||||
shortcuts: Object.values(tools)
|
shortcuts: Object.entries(tools)
|
||||||
.filter((tool) => !tool.disabled && !tool.href)
|
.filter(([, tool]) => !tool.href)
|
||||||
.map((tool) => {
|
.map(([id, tool]) => {
|
||||||
const stringId = (tool.strings ??
|
const stringId = (tool.strings ??
|
||||||
tool.id) as keyof typeof strings.website.tools;
|
id) as keyof typeof strings.website.tools;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name: strings.website.tools[stringId].name,
|
name: strings.website.tools[stringId].name,
|
||||||
@@ -54,8 +54,8 @@ export default defineConfig({
|
|||||||
short_name_localized: wrapper(
|
short_name_localized: wrapper(
|
||||||
(strings) => strings.website.tools[stringId].name,
|
(strings) => strings.website.tools[stringId].name,
|
||||||
),
|
),
|
||||||
url: `/${tool.id}`,
|
url: `/${tool.path ?? id}`,
|
||||||
icon: `public/assets/images/tools/${tool.id}.webp`,
|
icon: `public/assets/images/tools/${tool.path}.webp`,
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
|||||||
@@ -1,76 +1,46 @@
|
|||||||
import type { ButtonProps } from "@radix-ui/themes";
|
import type { ButtonProps } from "@radix-ui/themes";
|
||||||
|
|
||||||
export interface Tool {
|
export interface Tool {
|
||||||
id: string;
|
path?: string;
|
||||||
strings?: string;
|
strings?: string;
|
||||||
|
|
||||||
button: ButtonProps["color"];
|
button: ButtonProps["color"];
|
||||||
significant?: boolean;
|
|
||||||
disabled?: boolean;
|
|
||||||
href?: string;
|
href?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const tools: Record<string, Tool> = {
|
export const tools: Record<string, Tool> = {
|
||||||
tanks: {
|
tanks: {
|
||||||
id: "tanks",
|
|
||||||
strings: "tankopedia",
|
strings: "tankopedia",
|
||||||
button: "purple",
|
button: "purple",
|
||||||
significant: true,
|
|
||||||
},
|
|
||||||
players: {
|
|
||||||
id: "players",
|
|
||||||
disabled: true,
|
|
||||||
button: "blue",
|
|
||||||
},
|
},
|
||||||
compare: {
|
compare: {
|
||||||
id: "compare",
|
|
||||||
button: "crimson",
|
button: "crimson",
|
||||||
},
|
},
|
||||||
performance: {
|
performance: {
|
||||||
id: "performance",
|
|
||||||
button: "jade",
|
button: "jade",
|
||||||
},
|
},
|
||||||
charts: {
|
|
||||||
id: "charts",
|
|
||||||
disabled: true,
|
|
||||||
button: "bronze",
|
|
||||||
},
|
|
||||||
playlist: {
|
playlist: {
|
||||||
id: "playlist",
|
|
||||||
button: "tomato",
|
button: "tomato",
|
||||||
},
|
},
|
||||||
mixer: {
|
mixer: {
|
||||||
id: "mixer",
|
|
||||||
button: "gray",
|
button: "gray",
|
||||||
},
|
},
|
||||||
guess: {
|
guess: {
|
||||||
id: "guess",
|
|
||||||
button: "cyan",
|
button: "cyan",
|
||||||
},
|
},
|
||||||
gallery: {
|
gallery: {
|
||||||
id: "gallery",
|
|
||||||
button: "gold",
|
button: "gold",
|
||||||
},
|
},
|
||||||
session: {
|
session: {
|
||||||
id: "session",
|
|
||||||
button: "blue",
|
button: "blue",
|
||||||
},
|
},
|
||||||
tier_list: {
|
tier_list: {
|
||||||
id: "tier-list",
|
|
||||||
strings: "tier_list",
|
|
||||||
button: "orange",
|
button: "orange",
|
||||||
},
|
},
|
||||||
embed: {
|
embed: {
|
||||||
id: "embed",
|
|
||||||
button: "red",
|
button: "red",
|
||||||
},
|
},
|
||||||
api: {
|
|
||||||
id: "api",
|
|
||||||
disabled: true,
|
|
||||||
button: "bronze",
|
|
||||||
},
|
|
||||||
more: {
|
more: {
|
||||||
id: "more",
|
|
||||||
href: "https://discord.gg/nDt7AjGJQH",
|
href: "https://discord.gg/nDt7AjGJQH",
|
||||||
button: "plum",
|
button: "plum",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user