import type { ThemeProps } from "../../types"; import logo from "../../assets/icon.png"; import "./hyperspace.css"; export default function HyperspaceTheme({ config, state }: ThemeProps) { const { step, progress, installPath } = state; const { texts } = config; const getStatusText = () => { for (let i = texts.progressFrames.length - 1; i >= 0; i--) { if (progress <= texts.progressFrames[i].limit) return texts.progressFrames[i].text; } return texts.progressFrames[texts.progressFrames.length - 1]?.text ?? ""; }; return (
{/* 超空间星空背景特效 (纯 CSS 构建多层繁星) */}
Logo {config.appDisplayName}
{step === 1 && (

{texts.welcomeTitle}

{texts.welcomeSubtitle}

{installPath}
)} {step === 2 && (
{/* 跃迁隧道视效 */}
10 ? 1 : 0.2 }}>
40 ? 1 : 0.2 }}>
70 ? 1 : 0.2 }}>
{progress}%
{getStatusText()}
)} {step === 3 && (

{texts.successTitle}

{texts.successSubtitle}

{texts.features.map((f, i) => (
{f.label}
))}
)}
); }