"use client"; import { useEffect, useRef, useState, type KeyboardEvent } from "react"; import { Badge, Dialog, Icon, NpcSay, PixelButton, type IconName } from "../pixel"; import { getTrackedDownloadHref } from "../../lib/downloads"; import { detectClientPlatform } from "../../lib/platform"; import { platformDownloads, RELEASE_PAGE_URL, releaseVersion, SOURCE_URL, type PlatformDownload } from "../../lib/release-links"; import { Reveal } from "./reveal"; import { SectionHeader } from "./section-header"; import section from "./section.module.css"; import styles from "./save-point.module.css"; type PlatformId = PlatformDownload["id"]; const platformIcon: Record = { macos: "apple", windows: "windows", linux: "linux" }; export function SavePoint() { const [selected, setSelected] = useState("macos"); const tabs = useRef<(HTMLButtonElement | null)[]>([]); const platform = platformDownloads.find((item) => item.id === selected)!; useEffect(() => { void detectClientPlatform().then(({ os }) => { if (os !== "unknown") setSelected(os); }); }, []); function onKeyDown(event: KeyboardEvent) { const step = { ArrowRight: 1, ArrowLeft: -1 }[event.key]; if (!step) return; event.preventDefault(); const index = platformDownloads.findIndex((item) => item.id === selected); const next = (index + step + platformDownloads.length) % platformDownloads.length; setSelected(platformDownloads[next]!.id); tabs.current[next]!.focus(); } return (
{platformDownloads.map((item, index) => ( ))}

{platform.id === "macos" ? Signed + notarized : null} {platform.note}

    {platform.assets.map((asset) => (
  • {asset.label} {asset.fileName} {asset.architectures.map((arch) => ( {arch} ))} {asset.size} Download {asset.label}
  • ))}
Full release notes Source on Gitea
); }