mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: warning
This commit is contained in:
1 parent
0e76184813
commit
1ba6e70c56
3 files changed
+62
No files matched your search
@@ -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",
|
||||
|
||||
@@ -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);
|
||||
---
|
||||
|
||||
<style>
|
||||
.card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-3);
|
||||
max-width: 30rem;
|
||||
|
||||
padding: var(--space-4);
|
||||
margin: auto;
|
||||
|
||||
background-color: var(--red-3);
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<Section>
|
||||
<div class="card composable-radius" data-radius="1">
|
||||
<Heading size="4">
|
||||
<div class="title">
|
||||
<ExclamationTriangleIcon width="0.75em" height="0.75em" />
|
||||
{strings.client_unmounted.title}
|
||||
</div>
|
||||
</Heading>
|
||||
<Text>{strings.client_unmounted.body}</Text>
|
||||
</div>
|
||||
</Section>
|
||||
@@ -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) => <ColorScale color={tool.accent} />)}
|
||||
|
||||
{
|
||||
clientUnmounted && (
|
||||
<>
|
||||
<ColorScale color="red" />
|
||||
<ClientUnmountedWarning {locale} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
<HomeTanks {locale} />
|
||||
<HomePlayers {locale} />
|
||||
<HomeGames {locale} />
|
||||
|
||||
Reference in new issue
Block a user