import { Loader2 } from 'lucide-react'; import { PlatformPillBadge } from '../common/PlatformPillBadge'; import { PlatformProgressBar } from '../common/PlatformProgressBar'; import { buildExternalGenerationQueuePresentation, type ExternalGenerationQueueStatus, } from './platformExternalGenerationQueueStatusModel'; type PlatformProfileGenerationQueueCardProps = { queueStatus: ExternalGenerationQueueStatus | null; }; /** * “我的”页里的后台生成状态卡。 * 只展示当前账号可见的队列概览,业务完成仍以各玩法草稿 / 作品回读为准。 */ export function PlatformProfileGenerationQueueCard({ queueStatus, }: PlatformProfileGenerationQueueCardProps) { const presentation = buildExternalGenerationQueuePresentation(queueStatus); if (!presentation.shouldShow) { return null; } const progressValue = presentation.progress ?? 0; return (
生成队列
{presentation.statusLabel ?? '等待生成任务'}
{presentation.statusLabel ? ( {presentation.progressLabel ? `${presentation.statusLabel} ${presentation.progressLabel}` : presentation.statusLabel} ) : null}
{presentation.tasks.length > 0 ? (
{presentation.tasks.map((task) => (
{task.title} {task.statusLabel}
{task.detail} {task.priceLabel}
))}
) : null}
排队 {presentation.pendingLabel}
生成 {presentation.runningLabel}
待提示 {presentation.unacknowledgedTerminalCount}
); }