import { type CSSProperties } from 'react' import { useStore } from '@nanostores/react' import { Button } from '../components/button' import { $logPath, $mode, openLogDir, startInstall, startUpdate, type BootstrapStateModel } from '../store' import { RefreshCw, FileText } from 'lucide-react' interface FailureProps { bootstrap: BootstrapStateModel } /* * Failure screen. Same hero treatment as Welcome/Success — the wordmark * carries the brand, so we keep it across every terminal state. * * The actual error message lives below in muted text. Two clear * affordances: Retry (primary) and Open log folder (secondary). */ export default function Failure({ bootstrap }: FailureProps) { const logPath = useStore($logPath) const mode = useStore($mode) const isUpdate = mode === 'update' return (

{isUpdate ? 'Update didn\u2019t finish' : 'Install didn\u2019t finish'}

{bootstrap.error ?? (isUpdate ? 'Something went wrong during the update.' : 'Something went wrong during installation.')}

{logPath && (

Log: {logPath}

)}
) }