forked from 77media/video-flow
优化队列弹窗
This commit is contained in:
parent
041ed20cc3
commit
c70f4c9250
@ -100,9 +100,10 @@ export const showQueueNotification = (
|
|||||||
status: string,
|
status: string,
|
||||||
onCancel: () => void
|
onCancel: () => void
|
||||||
) => {
|
) => {
|
||||||
notification.open({
|
const notificationKey = 'queueNotification';
|
||||||
message: null,
|
|
||||||
description: (
|
// 创建或更新通知内容
|
||||||
|
const notificationContent = (
|
||||||
<div data-alt="queue-notification" style={{ minWidth: '320px' }}>
|
<div data-alt="queue-notification" style={{ minWidth: '320px' }}>
|
||||||
{/* AI导演工作室场景 */}
|
{/* AI导演工作室场景 */}
|
||||||
<div style={studioContainerStyle}>
|
<div style={studioContainerStyle}>
|
||||||
@ -139,7 +140,7 @@ export const showQueueNotification = (
|
|||||||
<button
|
<button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onCancel?.();
|
onCancel?.();
|
||||||
notification.destroy();
|
notification.destroy(notificationKey);
|
||||||
}}
|
}}
|
||||||
style={{
|
style={{
|
||||||
color: 'rgb(250 173 20 / 90%)',
|
color: 'rgb(250 173 20 / 90%)',
|
||||||
@ -159,7 +160,13 @@ export const showQueueNotification = (
|
|||||||
Cancel queue →
|
Cancel queue →
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
),
|
);
|
||||||
|
|
||||||
|
// 打开或更新通知
|
||||||
|
notification.open({
|
||||||
|
key: notificationKey,
|
||||||
|
message: null,
|
||||||
|
description: notificationContent,
|
||||||
duration: 0,
|
duration: 0,
|
||||||
placement: 'topRight',
|
placement: 'topRight',
|
||||||
style: {
|
style: {
|
||||||
@ -167,23 +174,7 @@ export const showQueueNotification = (
|
|||||||
border: '1px solid rgba(246, 178, 102, 0.2)',
|
border: '1px solid rgba(246, 178, 102, 0.2)',
|
||||||
},
|
},
|
||||||
className: 'director-studio-notification',
|
className: 'director-studio-notification',
|
||||||
closeIcon: (
|
closeIcon: null,
|
||||||
<button
|
|
||||||
className="hover:text-white"
|
|
||||||
style={{
|
|
||||||
background: 'transparent',
|
|
||||||
border: 'none',
|
|
||||||
padding: '2px',
|
|
||||||
cursor: 'pointer',
|
|
||||||
color: 'rgba(255, 255, 255, 0.45)',
|
|
||||||
transition: 'color 0.2s ease',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M18 6L6 18M6 6L18 18" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
),
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -106,9 +106,7 @@ export default function CreateToVideo2() {
|
|||||||
initial={{ opacity: 0, y: -10 }}
|
initial={{ opacity: 0, y: -10 }}
|
||||||
animate={{ opacity: 1, y: 0 }}
|
animate={{ opacity: 1, y: 0 }}
|
||||||
transition={{ duration: 0.4 }}
|
transition={{ duration: 0.4 }}
|
||||||
className="flex items-center gap-2 rounded-full
|
className="flex items-center"
|
||||||
bg-white/10 border border-white/20
|
|
||||||
px-3 py-1 backdrop-blur-md shadow-[0_0_8px_rgba(255,255,255,0.3)]"
|
|
||||||
>
|
>
|
||||||
{/* 进行中 脉冲小圆点 */}
|
{/* 进行中 脉冲小圆点 */}
|
||||||
{status === 'pending' && (
|
{status === 'pending' && (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user