From 1ba6e70c5653dbc87f100fc5518288f4c80f828b Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Tue, 5 May 2026 17:23:22 -0500 Subject: [PATCH] feat: warning --- packages/i18n/strings/en.json | 5 ++ .../components/ClientUnmountedWarning.astro | 47 +++++++++++++++++++ .../src/pages/[...locale]/index.astro | 10 ++++ 3 files changed, 62 insertions(+) create mode 100644 packages/website-ue/src/components/ClientUnmountedWarning.astro diff --git a/packages/i18n/strings/en.json b/packages/i18n/strings/en.json index 0467943f8..9b19692d4 100644 --- a/packages/i18n/strings/en.json +++ b/packages/i18n/strings/en.json @@ -72,6 +72,11 @@ "name": "BlitzKit" }, + "client_unmounted": { + "title": "Client-Unmounted Mode", + "body": "This version of BlitzKit is running in Client-Unmounted mode (it was compiled without access to an installation of World of Tanks Blitz). Some important features may be missing like tank icons, models, collision, etc." + }, + "units": { "hp_min": "{value}hp/min", "s": "{value}s", diff --git a/packages/website-ue/src/components/ClientUnmountedWarning.astro b/packages/website-ue/src/components/ClientUnmountedWarning.astro new file mode 100644 index 000000000..188fc4c44 --- /dev/null +++ b/packages/website-ue/src/components/ClientUnmountedWarning.astro @@ -0,0 +1,47 @@ +--- +import { ExclamationTriangleIcon } from "@radix-ui/react-icons"; +import { api } from "../core/api/dynamic"; +import { Heading } from "./Heading"; +import { Section } from "./Section"; +import { Text } from "./Text"; + +interface Props { + locale: string; +} + +const { locale } = Astro.props; + +const strings = await api.strings(locale); +--- + + + +
+
+ +
+ + {strings.client_unmounted.title} +
+
+ {strings.client_unmounted.body} +
+
diff --git a/packages/website-ue/src/pages/[...locale]/index.astro b/packages/website-ue/src/pages/[...locale]/index.astro index a7db16f7c..aaa3f6f75 100644 --- a/packages/website-ue/src/pages/[...locale]/index.astro +++ b/packages/website-ue/src/pages/[...locale]/index.astro @@ -1,6 +1,7 @@ --- import locales from "@blitzkit/i18n/locales.json"; import type { GetStaticPaths } from "astro"; +import ClientUnmountedWarning from "../../components/ClientUnmountedWarning.astro"; import ColorScale from "../../components/ColorScale.astro"; import HomeCosmetics from "../../components/HomeCosmetics.astro"; import HomeGames from "../../components/HomeGames.astro"; @@ -8,6 +9,7 @@ import HomeHero from "../../components/HomeHero.astro"; import HomePlayers from "../../components/HomePlayers.astro"; import HomeTanks from "../../components/HomeTanks.astro"; import HomeTechnical from "../../components/HomeTechnical.astro"; +import { clientUnmounted } from "../../core/game/game"; import { tools } from "../../core/tools/tools"; import BaseLayout from "../../layouts/BaseLayout.astro"; @@ -28,6 +30,14 @@ const { locale } = Astro.props; {Object.values(tools).map((tool) => )} + { + clientUnmounted && ( + <> + + + + ) + }