references and spinner fixes

This commit is contained in:
2025-12-22 01:18:49 -05:00
parent 12b36815df
commit 281654081d
9 changed files with 484 additions and 89 deletions

View File

@@ -1,29 +1,11 @@
import { onMount, onCleanup, createSignal } from "solid-js";
import { isServer } from "solid-js/web";
const spinnerChars = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
import { Spinner } from "~/components/Spinner";
export function TerminalSplash() {
const [showing, setShowing] = createSignal(0);
onMount(() => {
// Only run animation on client
if (isServer) return;
const interval = setInterval(() => {
setShowing((prev) => (prev + 1) % spinnerChars.length);
}, 50);
onCleanup(() => {
clearInterval(interval);
});
});
return (
<div class="bg-base flex min-h-screen w-full flex-col items-center justify-center overflow-hidden">
<div class="text-text max-w-3xl p-8 font-mono text-4xl whitespace-pre-wrap">
<div class="text-text max-w-3xl p-8">
<div class="flex items-center justify-center">
{spinnerChars[showing()]}
<Spinner size="xl" />
</div>
</div>
</div>