import { notification } from 'antd';
const darkGlassStyle = {
background: 'rgba(30, 32, 40, 0.95)',
backdropFilter: 'blur(10px)',
WebkitBackdropFilter: 'blur(10px)',
border: '1px solid rgba(255, 255, 255, 0.08)',
borderRadius: '8px',
boxShadow: '0 4px 16px rgba(0, 0, 0, 0.4)',
padding: '12px 16px',
};
/** AI导演工作室容器样式 */
const studioContainerStyle = {
position: 'relative' as const,
width: '100%',
height: '120px',
marginBottom: '16px',
background: 'rgba(26, 27, 30, 0.6)',
borderRadius: '8px',
overflow: 'hidden',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
};
/** AI导演组件 */
const AIDirector = () => (
);
/** 工作进度条组件 */
const ProgressTimeline = () => (
);
/** 工作台元素组件 */
const Workstation = () => (
{/* 小型场景图标,会在动画中浮动 */}
{[...Array(3)].map((_, i) => (
))}
);
/**
* 显示队列等待通知
* @param position - 当前队列位置
* @param estimatedMinutes - 预计等待分钟数
*/
export const showQueueNotification = (
position: number,
estimatedMinutes: number,
status: string,
onCancel: () => void
) => {
notification.open({
message: null,
description: (
{/* AI导演工作室场景 */}
{/* 队列信息 */}
🎬
{status === 'process' ? `您的作品正在制作,请等待完成后再创建新作品` : `您的作品正在第 ${position} 位等待制作`}
{/* 预计等待时间 */}
{status !== 'process' && `预计等待时间:约 ${estimatedMinutes} 分钟`}
{/* 取消按钮 */}
),
duration: 0,
placement: 'topRight',
style: {
...darkGlassStyle,
border: '1px solid rgba(246, 178, 102, 0.2)',
},
className: 'director-studio-notification',
closeIcon: (
),
});
};
// 添加必要的CSS动画
const styles = `
.ai-director {
animation: bounce 2s ease-in-out infinite;
}
.director-arm {
transform-origin: center;
animation: wave 1s ease-in-out infinite alternate;
}
@keyframes bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-5px); }
}
@keyframes wave {
0% { transform: rotate(-5deg); }
100% { transform: rotate(5deg); }
}
@keyframes float {
0% { transform: translateY(0); }
100% { transform: translateY(-10px); }
}
@keyframes progress {
0% { width: 0%; }
50% { width: 60%; }
100% { width: 30%; }
}
.director-studio-notification {
animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
from { transform: translateX(100%); opacity: 0; }
to { transform: translateX(0); opacity: 1; }
}
.scene-0 { animation-delay: 0s; }
.scene-1 { animation-delay: 0.2s; }
.scene-2 { animation-delay: 0.4s; }
`;
// 将样式注入到页面
if (typeof document !== 'undefined') {
const styleSheet = document.createElement('style');
styleSheet.textContent = styles;
document.head.appendChild(styleSheet);
}
// 配置通知
notification.config({
maxCount: 3,
});