mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +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,
|
||||
|
||||
shortcuts: Object.values(tools)
|
||||
.filter((tool) => !tool.disabled && !tool.href)
|
||||
.map((tool) => {
|
||||
shortcuts: Object.entries(tools)
|
||||
.filter(([, tool]) => !tool.href)
|
||||
.map(([id, tool]) => {
|
||||
const stringId = (tool.strings ??
|
||||
tool.id) as keyof typeof strings.website.tools;
|
||||
id) as keyof typeof strings.website.tools;
|
||||
|
||||
return {
|
||||
name: strings.website.tools[stringId].name,
|
||||
@@ -54,8 +54,8 @@ export default defineConfig({
|
||||
short_name_localized: wrapper(
|
||||
(strings) => strings.website.tools[stringId].name,
|
||||
),
|
||||
url: `/${tool.id}`,
|
||||
icon: `public/assets/images/tools/${tool.id}.webp`,
|
||||
url: `/${tool.path ?? id}`,
|
||||
icon: `public/assets/images/tools/${tool.path}.webp`,
|
||||
};
|
||||
}),
|
||||
|
||||
|
||||
@@ -1,76 +1,46 @@
|
||||
import type { ButtonProps } from "@radix-ui/themes";
|
||||
|
||||
export interface Tool {
|
||||
id: string;
|
||||
path?: string;
|
||||
strings?: string;
|
||||
|
||||
button: ButtonProps["color"];
|
||||
significant?: boolean;
|
||||
disabled?: boolean;
|
||||
href?: string;
|
||||
}
|
||||
|
||||
export const tools: Record<string, Tool> = {
|
||||
tanks: {
|
||||
id: "tanks",
|
||||
strings: "tankopedia",
|
||||
button: "purple",
|
||||
significant: true,
|
||||
},
|
||||
players: {
|
||||
id: "players",
|
||||
disabled: true,
|
||||
button: "blue",
|
||||
},
|
||||
compare: {
|
||||
id: "compare",
|
||||
button: "crimson",
|
||||
},
|
||||
performance: {
|
||||
id: "performance",
|
||||
button: "jade",
|
||||
},
|
||||
charts: {
|
||||
id: "charts",
|
||||
disabled: true,
|
||||
button: "bronze",
|
||||
},
|
||||
playlist: {
|
||||
id: "playlist",
|
||||
button: "tomato",
|
||||
},
|
||||
mixer: {
|
||||
id: "mixer",
|
||||
button: "gray",
|
||||
},
|
||||
guess: {
|
||||
id: "guess",
|
||||
button: "cyan",
|
||||
},
|
||||
gallery: {
|
||||
id: "gallery",
|
||||
button: "gold",
|
||||
},
|
||||
session: {
|
||||
id: "session",
|
||||
button: "blue",
|
||||
},
|
||||
tier_list: {
|
||||
id: "tier-list",
|
||||
strings: "tier_list",
|
||||
button: "orange",
|
||||
},
|
||||
embed: {
|
||||
id: "embed",
|
||||
button: "red",
|
||||
},
|
||||
api: {
|
||||
id: "api",
|
||||
disabled: true,
|
||||
button: "bronze",
|
||||
},
|
||||
more: {
|
||||
id: "more",
|
||||
href: "https://discord.gg/nDt7AjGJQH",
|
||||
button: "plum",
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user