From aac7ccb4e05a688eed6ecf8eebffee2ccb91073b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=97=E6=9E=B3?= <7854742+wang_rumeng@user.noreply.gitee.com> Date: Thu, 9 Oct 2025 16:16:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/pages/work-flow/media-viewer.tsx | 89 ++++++++++++--------- 1 file changed, 51 insertions(+), 38 deletions(-) diff --git a/components/pages/work-flow/media-viewer.tsx b/components/pages/work-flow/media-viewer.tsx index 016648c..93b2386 100644 --- a/components/pages/work-flow/media-viewer.tsx +++ b/components/pages/work-flow/media-viewer.tsx @@ -559,17 +559,8 @@ export const MediaViewer = React.memo(function MediaViewer({ )} {/* 生成失败 */} {taskObject.videos.data[currentSketchIndex].video_status === 2 && ( -
-
- { - const video = taskObject.videos.data[currentSketchIndex]; - if (onRetryVideo && video?.video_id) { - onRetryVideo(video.video_id); - } - }} /> -
+
+ error
)}
@@ -623,23 +614,55 @@ export const MediaViewer = React.memo(function MediaViewer({ )} - {/* 跳转剪辑按钮 */} + + + )} + + {/* 操作按钮组 */} + { + taskObject.videos.data[currentSketchIndex].video_status !== 0 && (
- {/* 视频编辑模式切换按钮 - 通过服务器配置控制显示 */} - {enableVideoEdit && showVideoModification && ( - - { - console.log('🖊️ 钢笔图标被点击,切换编辑模式:', !isVideoEditMode); - setIsVideoEditMode(!isVideoEditMode); - }} - className={isVideoEditMode ? 'bg-blue-500/20 border-blue-500/50' : ''} - /> - + {taskObject.videos.data[currentSketchIndex].video_status === 1 ? ( + <> + {/* 视频编辑模式切换按钮 - 通过服务器配置控制显示 */} + {enableVideoEdit && showVideoModification && ( + + { + console.log('🖊️ 钢笔图标被点击,切换编辑模式:', !isVideoEditMode); + setIsVideoEditMode(!isVideoEditMode); + }} + className={isVideoEditMode ? 'bg-blue-500/20 border-blue-500/50' : ''} + /> + + )} + + + { + const currentVideo = taskObject.videos.data[currentSketchIndex]; + if (currentVideo && currentVideo.urls && currentVideo.urls.length > 0) { + setIsLoadingDownloadBtn(true); + await downloadVideo(currentVideo.urls[0]); + setIsLoadingDownloadBtn(false); + } + }} /> + + + ) : ( + <> + + { + const video = taskObject.videos.data[currentSketchIndex]; + if (onRetryVideo && video?.video_id) { + onRetryVideo(video.video_id); + } + }} /> + + )} {/* 添加到chat去编辑 按钮 */} @@ -659,17 +682,6 @@ export const MediaViewer = React.memo(function MediaViewer({ setIsLoadingDownloadAllVideosBtn(false); }} /> - {/* 下载按钮 */} - - { - const currentVideo = taskObject.videos.data[currentSketchIndex]; - if (currentVideo && currentVideo.urls && currentVideo.urls.length > 0) { - setIsLoadingDownloadBtn(true); - await downloadVideo(currentVideo.urls[0]); - setIsLoadingDownloadBtn(false); - } - }} /> - {/* 跳转剪辑按钮 */} {showGotoCutButton && ( @@ -677,8 +689,9 @@ export const MediaViewer = React.memo(function MediaViewer({ )}
- - )} + ) + } + {/* 操作按钮组 */} {/*