diff --git a/packages/website/astro.config.ts b/packages/website/astro.config.ts index b38d10811..85797cede 100644 --- a/packages/website/astro.config.ts +++ b/packages/website/astro.config.ts @@ -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`, }; }), diff --git a/packages/website/src/constants/tools.ts b/packages/website/src/constants/tools.ts index 100979a14..2ca6e02ea 100644 --- a/packages/website/src/constants/tools.ts +++ b/packages/website/src/constants/tools.ts @@ -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 = { 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", },