import type { ThemeProps } from "../../types"; import "./coral.css"; export default function CoralTheme({ 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 "--app-coral": primaryColor, }; return (
{/* 1. 官方深色顶栏 */}
{config.appDisplayName.charAt(0).toUpperCase()}
{config.appDisplayName}
{/* 2. 主体展示区(暖米色底色) */}
{step === 1 && (
当前状态: 准备部署
{config.appPublisher} 官方正版授权

{texts.welcomeTitle}

{texts.welcomeSubtitle}

)} {step === 2 && (
>_ {getStatusText()}
{progress}% 已完成 正在注入底层驱动
)} {step === 3 && (
部署完毕

{texts.successTitle}

{texts.successSubtitle}

)} {/* 3. 页脚控制栏 */}
{step === 1 && ( <>
我已同意并接受 {texts.licenseAgreement}
)} {step === 2 && ( <>
部署进行中,请勿关闭系统...
)} {step === 3 && ( <>
)}
); }