fix(experience-center): 统一图像与视频生成界面并修复参数显示

对齐表单、预览与任务区,跟随系统主题色,修复图片尺寸选择和视频高级参数显示。已通过本地浏览器验收、Lint、UI 审计和单测;未做生产测试。
This commit is contained in:
zhanjunhao
2026-11-20 18:30:13 +08:00
parent cd0452d769
commit aa9fe33d08
17 changed files with 1819 additions and 1812 deletions
@@ -1,6 +1,6 @@
import React, { useContext } from 'react';
import { useTranslation } from 'react-i18next';
import { Video, Sparkles, Clapperboard, Film, Play } from 'lucide-react';
import { Video } from 'lucide-react';
import VideoGenerationTab from './AICreation/VideoGenerationTab';
import CreationStudio from '../../../components/creation/CreationStudio';
import { StatusContext } from '../../../context/Status';
@@ -16,81 +16,17 @@ const VideoGeneration = () => {
}
return (
<div className='h-full flex flex-col p-6 relative overflow-hidden'>
{/* 背景由父级 ExperienceCenter 的 PageBackground(rich) 统一提供,此处不再渲染 */}
{/* Header */}
<div className='relative z-10 flex-shrink-0 mb-6'>
<div className='flex items-center gap-4'>
{/* 图标容器 */}
<div className='relative'>
<div className='absolute -inset-2 bg-gradient-to-r from-cyan-500/30 to-blue-500/30 rounded-2xl blur-lg opacity-60' />
<div className='relative p-3 bg-gradient-to-br from-cyan-500 via-blue-500 to-brand-to rounded-2xl shadow-xl shadow-cyan-500/30'>
<Video size={26} className='text-white' />
</div>
<Sparkles
size={16}
className='absolute -top-1 -right-1 text-amber-400 animate-pulse'
/>
{/* 播放动画指示器 */}
<div className='absolute -bottom-1 -left-1 w-5 h-5 rounded-full bg-green-500 flex items-center justify-center shadow-lg shadow-green-500/50'>
<Play size={10} className='text-white ml-0.5' fill='white' />
</div>
</div>
{/* 标题文字 */}
<div>
<h1 className='text-2xl md:text-3xl font-bold flex items-center gap-2'>
<span className='bg-clip-text text-transparent bg-gradient-to-r from-cyan-600 via-blue-600 to-brand-to dark:from-cyan-400 dark:via-blue-400 dark:to-brand-to'>
{t('视频生成')}
</span>
</h1>
<p className='text-sm text-gray-500 dark:text-gray-400 mt-1'>
{t('使用 AI 创建令人惊叹的视频内容')}
</p>
</div>
{/* 右侧装饰标签 */}
<div className='hidden md:flex items-center gap-2 ml-auto'>
<div className='flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-gradient-to-r from-cyan-50 to-teal-50 dark:from-cyan-950/30 dark:to-teal-950/30 border border-cyan-200/50 dark:border-cyan-800/30'>
<Clapperboard size={14} className='text-cyan-500' />
<span className='text-xs font-medium text-cyan-600 dark:text-cyan-400'>
{t('图生视频')}
</span>
</div>
<div className='flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-gradient-to-r from-blue-50 to-brand-to/5 dark:from-blue-950/30 dark:to-brand-to/30 border border-blue-200/50 dark:border-blue-800/30'>
<Film size={14} className='text-blue-500' />
<span className='text-xs font-medium text-blue-600 dark:text-blue-400'>
{t('文生视频')}
</span>
</div>
<div className='flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-gradient-to-r from-brand-from/5 to-brand-to/5 dark:from-brand-from/30 dark:to-brand-to/30 border border-brand/50 dark:border-brand-deep/30'>
<Sparkles size={14} className='text-brand' />
<span className='text-xs font-medium text-brand-deep dark:text-brand-from'>
{t('多模型支持')}
</span>
</div>
</div>
<div className='video-workspace app-scrollbar'>
<header className='video-workspace-heading'>
<span className='video-workspace-icon' aria-hidden='true'>
<Video size={22} />
</span>
<div>
<h1>{t('视频生成')}</h1>
<p>{t('使用 AI 创建令人惊叹的视频内容')}</p>
</div>
</div>
{/* Content */}
<div className='relative z-10 flex-1 min-h-0'>
{/* 卡片装饰边框 */}
<div className='absolute -inset-0.5 bg-gradient-to-r from-cyan-500/20 via-blue-500/20 to-brand-to/20 rounded-[20px] blur-sm opacity-60' />
{/* 内容卡片 */}
<div className='relative h-full bg-white/70 dark:bg-neutral-900/70 backdrop-blur-xl rounded-2xl border border-white/50 dark:border-neutral-800/50 shadow-xl shadow-cyan-500/5 overflow-hidden'>
{/* 顶部装饰线 */}
<div className='absolute top-0 left-0 right-0 h-[2px] bg-gradient-to-r from-transparent via-cyan-500/50 to-transparent' />
{/* 左侧装饰线 */}
<div className='absolute top-0 bottom-0 left-0 w-[2px] bg-gradient-to-b from-transparent via-blue-500/30 to-transparent' />
<VideoGenerationTab />
</div>
</div>
</header>
<VideoGenerationTab />
</div>
);
};