CI / Typecheck, lint, tests, e2e (push) Failing after 3m51s
- Title screen over a real-time voxel office rendered at low resolution and quantized to a rotating 32-colour palette with Bayer dithering; day part and season re-light the scene and every surface. - 16-bit UI kit: name-plate dialogs, menu cursor, inventory, XP bar, badges, NPC speech, GAME OVER with CONTINUE, hand-placed 12x12 icons, Fusion Pixel font (Latin subset preloaded). - Sections as a game: quest log (onboarding), character select (AI CEO / AI Co-Founder), inventory (features), party roster (providers), live download XP, save point (all v1.5.1 builds), FAQ as NPC dialog, credits. - Downloads and source point to the Gitea release; the download function only redirects to git.zacharyzhang.com. - Tailwind and the old components removed; unit tests for platform/downloads, rewritten e2e suite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
1.5 KiB
TypeScript
41 lines
1.5 KiB
TypeScript
"use client";
|
|
|
|
import { useEffect, useState } from "react";
|
|
import { PixelButton } from "../pixel";
|
|
import { getTrackedDownloadHref, type ReleaseDownloadAsset } from "../../lib/downloads";
|
|
import { detectClientPlatform, recommendedAsset, type DetectedPlatform } from "../../lib/platform";
|
|
import styles from "./title-screen.module.css";
|
|
|
|
/** Server renders "Choose your platform"; the browser swaps in the build for this machine. */
|
|
export function PlatformCta() {
|
|
const [detected, setDetected] = useState<{ platform: DetectedPlatform; asset: ReleaseDownloadAsset | null } | null>(null);
|
|
|
|
useEffect(() => {
|
|
void detectClientPlatform().then((platform) => setDetected({ platform, asset: recommendedAsset(platform) }));
|
|
}, []);
|
|
|
|
const asset = detected?.asset ?? null;
|
|
if (!asset) {
|
|
const mac = detected?.platform.os === "macos";
|
|
return (
|
|
<span className={styles.cta}>
|
|
<PixelButton href="#save-point" icon="download">
|
|
{mac ? "Choose your Mac build" : "Choose your platform"}
|
|
</PixelButton>
|
|
<span className={styles.ctaNote}>{mac ? "Apple Silicon or Intel" : "macOS · Windows · Linux"}</span>
|
|
</span>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<span className={styles.cta}>
|
|
<PixelButton href={getTrackedDownloadHref(asset.id)} icon="download">
|
|
Download for {asset.platformTitle}
|
|
</PixelButton>
|
|
<span className={styles.ctaNote}>
|
|
{asset.label} · {asset.size} · <a href="#save-point">other builds</a>
|
|
</span>
|
|
</span>
|
|
);
|
|
}
|