diff --git a/backend.log b/backend.log index d11d406d..aa238fee 100644 --- a/backend.log +++ b/backend.log @@ -124,3 +124,4 @@ NFO - WebSocket网关服务已禁用 2025-09-15 19:33:31,936 - backend.main - INFO - API密钥已加载到环境变量 2025-09-15 19:33:31,936 - backend.main - INFO - WebSocket网关服务已禁用,使用新的简化进度系统 2025-09-15 19:33:48,972 - backend.core.llm_manager - INFO - 已初始化dashscope提供商,模型: qwen-plus +2025-09-15 20:19:52,449 - backend.api.v1.projects - ERROR - 生成合集视频失败: clips_dir 参数是必需的,不能使用全局路径 diff --git a/data/autoclip.db b/data/autoclip.db index 243fb5c2..cb738174 100644 Binary files a/data/autoclip.db and b/data/autoclip.db differ diff --git a/frontend/src/components/ClipCard.tsx b/frontend/src/components/ClipCard.tsx index 60836917..88242446 100644 --- a/frontend/src/components/ClipCard.tsx +++ b/frontend/src/components/ClipCard.tsx @@ -458,7 +458,6 @@ const ClipCard: React.FC = ({ {/* 视频播放模态框 */} = ({ background: '#1f1f1f' } }} + closeIcon={ + × + } + title={ +
+ { + // 更新clip的标题 + console.log('播放器标题已更新:', newTitle) + // 这里可以触发父组件的更新回调 + if (onClipUpdate) { + onClipUpdate(clip.id, { title: newTitle }) + } + }} + style={{ + color: '#ffffff', + fontSize: '16px', + fontWeight: '500', + flex: 1, + maxWidth: 'calc(100% - 40px)' // 确保不会与关闭按钮重叠 + }} + /> +
+ } > {videoUrl && ( = ({
{/* 标题 */}
- - {clip.generated_title || clip.title || '未命名片段'} - +
+ { + // 更新clip的标题 + console.log('标题已更新:', newTitle) + // 这里可以触发父组件的更新回调 + }} + style={{ color: '#ffffff', fontSize: '18px', fontWeight: '600' }} + /> +
ID: {clip.id} diff --git a/frontend/src/components/CollectionPreviewModal.tsx b/frontend/src/components/CollectionPreviewModal.tsx index 9ba4606e..456c4a83 100644 --- a/frontend/src/components/CollectionPreviewModal.tsx +++ b/frontend/src/components/CollectionPreviewModal.tsx @@ -8,6 +8,7 @@ import { projectApi } from '../services/api' import AddClipToCollectionModal from './AddClipToCollectionModal' import { useCollectionVideoDownload } from '../hooks/useCollectionVideoDownload' import UploadModal from './UploadModal' +import EditableTitle from './EditableTitle' import './CollectionPreviewModal.css' const { Title, Text } = Typography @@ -324,7 +325,17 @@ const CollectionPreviewModal: React.FC = ({
- {currentClip.title || currentClip.generated_title} + { + // 更新当前clip的标题 + const updatedClip = { ...currentClip, title: newTitle } + // 这里可以触发父组件的更新回调 + console.log('标题已更新:', newTitle) + }} + style={{ color: '#ffffff', fontSize: '16px', fontWeight: '500' }} + />
{formatDuration(currentClip)} diff --git a/frontend/src/components/EditableTitle.tsx b/frontend/src/components/EditableTitle.tsx index 98c37f81..48c17dcd 100644 --- a/frontend/src/components/EditableTitle.tsx +++ b/frontend/src/components/EditableTitle.tsx @@ -185,38 +185,35 @@ const EditableTitle: React.FC = ({ } return ( -
{title} + -
) }