import type { ThemeProps } from "../../types";
import logo from "../../assets/icon.png";
import "./gaming.css";
export default function GamingTheme({ config, state }: ThemeProps) {
const { step, progress, installPath } = state;
const { texts, primaryColor } = 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 ?? "";
};
const cssVars: React.CSSProperties = {
// @ts-expect-error
"--gm-primary": primaryColor || "#00ff00",
};
return (
{/* RGB 流光边框 */}
{config.appDisplayName.toUpperCase()} // SETUP
{step === 1 && (
{texts.welcomeTitle}
{texts.welcomeSubtitle}
)}
{step === 2 && (
{progress}%
{getStatusText()}
)}
{step === 3 && (
{texts.successTitle}
{texts.successSubtitle}
{texts.features.map((f, i) => (
{f.label}
))}
)}
);
}