mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
Compare commits
5
Commits
xi
..
production
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
273fea1599 | ||
|
|
7df53d845d | ||
|
|
1b5c79c2b8 | ||
|
|
51900f4c80 | ||
|
|
989e3d395a |
No files matched your search
+2
-1
@@ -10,7 +10,8 @@
|
|||||||
"build-protos": "cd packages/scripts && bun run build-protos",
|
"build-protos": "cd packages/scripts && bun run build-protos",
|
||||||
"record-performance": "cd packages/scripts && bun run record-performance",
|
"record-performance": "cd packages/scripts && bun run record-performance",
|
||||||
"download-client": "cd packages/scripts && bun run download-client",
|
"download-client": "cd packages/scripts && bun run download-client",
|
||||||
"clean-astro": "rm -rf packages/website/.astro packages/website/node_modules/.astro packages/website/node_modules/.vite"
|
"clean-astro": "rm -rf packages/website/.astro packages/website/node_modules/.astro packages/website/node_modules/.vite",
|
||||||
|
"vfs": "cd packages/scripts && bun run vfs"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
"discover-ids": "bun src/discoverIds/index.ts",
|
"discover-ids": "bun src/discoverIds/index.ts",
|
||||||
"build-protos": "bun src/protos.ts",
|
"build-protos": "bun src/protos.ts",
|
||||||
"record-performance": "bun src/recordPerformance/index.ts",
|
"record-performance": "bun src/recordPerformance/index.ts",
|
||||||
"download-client": "bun src/downloadClient/index.ts"
|
"download-client": "bun src/downloadClient/index.ts",
|
||||||
|
"vfs": "bun src/vfs/index.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzkit/closed": "workspace:*",
|
"@blitzkit/closed": "workspace:*",
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import { assertSecret } from "@blitzkit/core";
|
||||||
|
import { LocalVFS } from "@blitzkit/core/src/blitzkit/vfs/local";
|
||||||
|
|
||||||
|
export const vfs = new LocalVFS(assertSecret(import.meta.env.CLIENT_DIR));
|
||||||
|
|
||||||
|
const command = Bun.argv[2];
|
||||||
|
const path = Bun.argv[3];
|
||||||
|
|
||||||
|
if (!path) {
|
||||||
|
console.error("Gimme a path to assess dumb ass");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (command === "cat") {
|
||||||
|
const content = await vfs.file(path);
|
||||||
|
await Bun.write(Bun.stdout, content);
|
||||||
|
} else if (command === "ls") {
|
||||||
|
const files = await vfs.dir(path);
|
||||||
|
|
||||||
|
for (const file of files) {
|
||||||
|
console.log(file);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
import { Code, Flex, Heading, Link, Text } from "@radix-ui/themes";
|
||||||
|
import { useEffect, useState, type ReactNode } from "react";
|
||||||
|
import type { MaybeSkeletonComponentProps } from "../types/maybeSkeletonComponentProps";
|
||||||
|
import { InlineSkeleton } from "./InlineSkeleton";
|
||||||
|
|
||||||
|
const TIME = 1792598400 * 1000;
|
||||||
|
|
||||||
|
export function Countdown({ skeleton }: MaybeSkeletonComponentProps) {
|
||||||
|
const [timeLeft, setTimeLeft] = useState<number>(TIME - Date.now());
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const interval = setInterval(() => {
|
||||||
|
setTimeLeft(TIME - Date.now());
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
clearInterval(interval);
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
let string: ReactNode;
|
||||||
|
|
||||||
|
if (timeLeft > 0) {
|
||||||
|
const hours = Math.floor(timeLeft / (1000 * 60 * 60));
|
||||||
|
const minutes = Math.floor((timeLeft / (1000 * 60)) % 60)
|
||||||
|
.toString()
|
||||||
|
.padStart(2, "0");
|
||||||
|
const seconds = Math.floor((timeLeft / 1000) % 60)
|
||||||
|
.toString()
|
||||||
|
.padStart(2, "0");
|
||||||
|
|
||||||
|
string = (
|
||||||
|
<>
|
||||||
|
revealed in{" "}
|
||||||
|
<Code highContrast>
|
||||||
|
{hours}h {minutes}m {seconds}s
|
||||||
|
</Code>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
string = "have been revealed.";
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Flex justify="center" px="4">
|
||||||
|
<Link
|
||||||
|
color="gray"
|
||||||
|
highContrast
|
||||||
|
style={{ display: "content" }}
|
||||||
|
href="https://preview.blitzkit.app/tanks"
|
||||||
|
underline="none"
|
||||||
|
>
|
||||||
|
<Flex
|
||||||
|
mt="3"
|
||||||
|
px="5"
|
||||||
|
py="4"
|
||||||
|
style={{
|
||||||
|
borderRadius: "var(--radius-3)",
|
||||||
|
backgroundImage: "url(https://i.imgur.com/xgngxoy.png)",
|
||||||
|
backgroundSize: "cover",
|
||||||
|
backgroundPosition: "center",
|
||||||
|
boxSizing: "border-box",
|
||||||
|
boxShadow: "0 0 var(--space-7) var(--white-a2)",
|
||||||
|
}}
|
||||||
|
align="center"
|
||||||
|
gap="5"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
src="https://i.imgur.com/kXV3r3P.png"
|
||||||
|
style={{
|
||||||
|
height: "min(15vw, 5rem)",
|
||||||
|
filter: "drop-shadow(0.5rem 0.5rem 1rem #00000080)",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Flex direction="column">
|
||||||
|
<Heading size={{ initial: "4", sm: "6" }}>
|
||||||
|
Tier XIs {!skeleton && string}{" "}
|
||||||
|
{skeleton && <InlineSkeleton width="10rem" />}
|
||||||
|
</Heading>
|
||||||
|
<Text size={{ initial: "2", sm: "3" }}>
|
||||||
|
Get ready to go to the Tankopedia!
|
||||||
|
</Text>
|
||||||
|
</Flex>
|
||||||
|
</Flex>
|
||||||
|
</Link>
|
||||||
|
</Flex>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ import locales from "@blitzkit/i18n/locales.json";
|
|||||||
import { literals } from "@blitzkit/i18n/src/literals";
|
import { literals } from "@blitzkit/i18n/src/literals";
|
||||||
import { Box, Flex, Link } from "@radix-ui/themes";
|
import { Box, Flex, Link } from "@radix-ui/themes";
|
||||||
import { AesonPlug } from "../../../components/AesonPlug";
|
import { AesonPlug } from "../../../components/AesonPlug";
|
||||||
|
import { Countdown } from "../../../components/Countdown";
|
||||||
import HomeHero from "../../../components/HomeHero.astro";
|
import HomeHero from "../../../components/HomeHero.astro";
|
||||||
import { Plugs } from "../../../components/Plugs";
|
import { Plugs } from "../../../components/Plugs";
|
||||||
import ToolCard from "../../../components/ToolCard.astro";
|
import ToolCard from "../../../components/ToolCard.astro";
|
||||||
@@ -65,6 +66,8 @@ export const getStaticPaths = mixStaticPaths(_getStaticPaths, () => {
|
|||||||
<BaseLayout {locale}>
|
<BaseLayout {locale}>
|
||||||
<HomeHero />
|
<HomeHero />
|
||||||
|
|
||||||
|
<Countdown client:load />
|
||||||
|
|
||||||
{
|
{
|
||||||
locale !== locales.default && (
|
locale !== locales.default && (
|
||||||
<Flex justify="center" pt="4" my="4">
|
<Flex justify="center" pt="4" my="4">
|
||||||
|
|||||||
Reference in new issue
Block a user