import type { ThemeProps } from "../../types";
import "./synthwave.css";
export default function SynthwaveTheme({ 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 (
{/* 背景网格与太阳 */}
{config.appDisplayName}
{step === 1 && (
{texts.welcomeTitle}
{texts.welcomeSubtitle}
)}
{step === 2 && (
{progress}%
{getStatusText()}
)}
{step === 3 && (
{texts.successTitle}
{texts.successSubtitle}
{texts.features.map(f => (
{f.label}
))}
)}
);
}