mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
Compare commits
2
Commits
main
...
35ed716659
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35ed716659 | ||
|
|
bea55f1b6c |
No files matched your search
@@ -1,13 +1,7 @@
|
|||||||
import react from "@astrojs/react";
|
import react from "@astrojs/react";
|
||||||
import { wrapper } from "@blitzkit/i18n";
|
|
||||||
import locales from "@blitzkit/i18n/locales.json";
|
|
||||||
import strings from "@blitzkit/i18n/strings/en.json";
|
import strings from "@blitzkit/i18n/strings/en.json";
|
||||||
import { mauve, mauveDark } from "@radix-ui/colors";
|
|
||||||
import AstroPWA from "@vite-pwa/astro";
|
|
||||||
import favicons from "astro-favicons";
|
import favicons from "astro-favicons";
|
||||||
import { defineConfig } from "astro/config";
|
import { defineConfig } from "astro/config";
|
||||||
import packageJSON from "../../package.json";
|
|
||||||
import { tools } from "./src/constants/tools";
|
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
devToolbar: { enabled: false },
|
devToolbar: { enabled: false },
|
||||||
@@ -29,55 +23,6 @@ export default defineConfig({
|
|||||||
name: strings.common.name,
|
name: strings.common.name,
|
||||||
short_name: strings.common.name,
|
short_name: strings.common.name,
|
||||||
|
|
||||||
background: mauveDark.mauve1,
|
|
||||||
themes: [mauve.mauve1, mauveDark.mauve1],
|
|
||||||
appleStatusBarStyle: "black-translucent",
|
|
||||||
|
|
||||||
version: packageJSON.version,
|
|
||||||
|
|
||||||
shortcuts: Object.values(tools)
|
|
||||||
.filter((tool) => !tool.disabled && !tool.href)
|
|
||||||
.map((tool) => {
|
|
||||||
const stringId = (tool.strings ??
|
|
||||||
tool.id) as keyof typeof strings.website.tools;
|
|
||||||
|
|
||||||
return {
|
|
||||||
name: strings.website.tools[stringId].name,
|
|
||||||
name_localized: wrapper(
|
|
||||||
(strings) => strings.website.tools[stringId].name,
|
|
||||||
),
|
|
||||||
description: strings.website.tools[stringId].description,
|
|
||||||
description_localized: wrapper(
|
|
||||||
(strings) => strings.website.tools[stringId].description,
|
|
||||||
),
|
|
||||||
short_name: strings.website.tools[stringId].name,
|
|
||||||
short_name_localized: wrapper(
|
|
||||||
(strings) => strings.website.tools[stringId].name,
|
|
||||||
),
|
|
||||||
url: `/${tool.id}`,
|
|
||||||
icon: `public/assets/images/tools/${tool.id}.webp`,
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
|
|
||||||
manifest: {
|
|
||||||
description: strings.website.home.seo_description,
|
|
||||||
description_localized: wrapper(
|
|
||||||
(strings) => strings.website.home.seo_description,
|
|
||||||
),
|
|
||||||
|
|
||||||
dir: "ltr",
|
|
||||||
categories: ["utilities", "games", "developer", "developer tools"],
|
|
||||||
|
|
||||||
id: "com.tresabhi.blitzkit",
|
|
||||||
start_url: "/",
|
|
||||||
launch_handler: { client_mode: "navigate-new" },
|
|
||||||
display: "fullscreen",
|
|
||||||
display_override: ["fullscreen", "standalone", "minimal-ui"],
|
|
||||||
|
|
||||||
lang: locales.default,
|
|
||||||
orientation: "any",
|
|
||||||
},
|
|
||||||
|
|
||||||
icons: {
|
icons: {
|
||||||
windows: true,
|
windows: true,
|
||||||
android: true,
|
android: true,
|
||||||
@@ -88,21 +33,6 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
||||||
AstroPWA({
|
|
||||||
manifest: false,
|
|
||||||
devOptions: { enabled: true },
|
|
||||||
workbox: {
|
|
||||||
globPatterns: ["**/*.{html,css,js,png,webp,svg,xml,json}"],
|
|
||||||
runtimeCaching: [
|
|
||||||
{
|
|
||||||
urlPattern: ({ url }) =>
|
|
||||||
url.href.startsWith(import.meta.env.PUBLIC_ASSET_BASE),
|
|
||||||
handler: "NetworkFirst",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
|
|
||||||
react(),
|
react(),
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
@@ -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