import { PageHead } from "~/components/PageHead"; import { A } from "@solidjs/router"; import { createSignal, onMount, onCleanup } from "solid-js"; import DownloadOnAppStore from "~/components/icons/DownloadOnAppStore"; import { glitchText } from "~/lib/client-utils"; import Button from "~/components/ui/Button"; export default function DownloadsPage() { const [LaLText, setLaLText] = createSignal("Life and Lineage"); const [SwAText, setSwAText] = createSignal("Shapes with Abigail!"); const [corkText, setCorkText] = createSignal("Cork"); const [gazeText, setGazeText] = createSignal("Gaze"); // Track loading states for each download button const [loadingState, setLoadingState] = createSignal>( { lineage: false, cork: false, gaze: false, "shapes-with-abigail": false } ); const download = (assetName: string) => { // Prevent multiple rapid clicks if (loadingState()[assetName]) return; // Set loading state setLoadingState((prev) => ({ ...prev, [assetName]: true })); // Call the tRPC endpoint directly import("~/lib/api").then(({ api }) => { api.downloads.getDownloadUrl .query({ asset_name: assetName }) .then((data) => { const url = data.downloadURL; window.location.href = url; }) .catch((error) => { console.error("Download error:", error); // Optionally show user a message alert("Failed to initiate download. Please try again."); }) .finally(() => { // Reset loading state regardless of success/failure setLoadingState((prev) => ({ ...prev, [assetName]: false })); }); }); }; onMount(() => { const lalInterval = glitchText(LaLText(), setLaLText); const swaInterval = glitchText(SwAText(), setSwAText); const corkInterval = glitchText(corkText(), setCorkText); const gazeInterval = glitchText(gazeText(), setGazeText); onCleanup(() => { clearInterval(lalInterval); clearInterval(swaInterval); clearInterval(corkInterval); clearInterval(gazeInterval); }); }); return ( <>
{/* Subtle scanline effect */}
Ordered by date of initial release
{/* Gaze */}

{">"} {gazeText()}

platform: macOS (13.0+)

{">"} {LaLText()}

platform: android # android build not optimized
platform: ios
{/* Cork */}

{">"} {corkText()}

platform: macOS (13+) # unzip → drag to /Applications
{/* Shapes with Abigail */}

{">"} {SwAText()}

platform: android
platform: ios
); }