diff --git a/app/create/layout.tsx b/app/movies/layout.tsx
similarity index 100%
rename from app/create/layout.tsx
rename to app/movies/layout.tsx
diff --git a/app/create/page.tsx b/app/movies/page.tsx
similarity index 100%
rename from app/create/page.tsx
rename to app/movies/page.tsx
diff --git a/app/create/work-flow/page.tsx b/app/movies/work-flow/page.tsx
similarity index 100%
rename from app/create/work-flow/page.tsx
rename to app/movies/work-flow/page.tsx
diff --git a/components/ChatInputBox/ChatInputBox.tsx b/components/ChatInputBox/ChatInputBox.tsx
index de7a5bf..981ec00 100644
--- a/components/ChatInputBox/ChatInputBox.tsx
+++ b/components/ChatInputBox/ChatInputBox.tsx
@@ -150,7 +150,7 @@ const RenderTemplateStoryMode = ({
);
if (projectId) {
// 跳转到电影详情页
- router.push(`/create/work-flow?episodeId=${projectId}`);
+ router.push(`/movies/work-flow?episodeId=${projectId}`);
onClose();
// 重置状态
setSelectedTemplate(null);
@@ -853,7 +853,7 @@ export function ChatInputBox({ noData }: { noData: boolean }) {
episodeData
);
const episodeId = result.project_id;
- router.push(`/create/work-flow?episodeId=${episodeId}`);
+ router.push(`/movies/work-flow?episodeId=${episodeId}`);
} catch (error) {
console.error("创建剧集失败:", error);
} finally {
@@ -1262,7 +1262,7 @@ const PhotoStoryModal = ({
if (!episodeResponse) return;
let episodeId = episodeResponse.project_id;
// let episodeId = '9c34fcc4-c8d8-44fc-879e-9bd56f608c76';
- router.push(`/create/work-flow?episodeId=${episodeId}`);
+ router.push(`/movies/work-flow?episodeId=${episodeId}`);
// 成功后关闭弹窗
handleClose();
} catch (error) {
diff --git a/components/layout/sidebar.tsx b/components/layout/sidebar.tsx
index f917513..aba8bb0 100644
--- a/components/layout/sidebar.tsx
+++ b/components/layout/sidebar.tsx
@@ -32,7 +32,7 @@ const navigationItems = [
{
title: 'Main',
items: [
- { name: 'My Portfolio', href: '/create', icon: BookHeart },
+ { name: 'My Portfolio', href: '/movies', icon: BookHeart },
],
}
];
diff --git a/components/layout/top-bar.tsx b/components/layout/top-bar.tsx
index fc43ccb..5331f58 100644
--- a/components/layout/top-bar.tsx
+++ b/components/layout/top-bar.tsx
@@ -213,7 +213,7 @@ export function TopBar({ collapsed }: { collapsed: boolean }) {
router.push("/create")}
+ onClick={() => router.push("/movies")}
>
Go Started
@@ -367,7 +367,7 @@ export function TopBar({ collapsed }: { collapsed: boolean }) {
router.push("/create")}
+ onClick={() => router.push("/movies")}
>
Go Started
diff --git a/components/pages/create-to-video2.tsx b/components/pages/create-to-video2.tsx
index e2ee369..c72451a 100644
--- a/components/pages/create-to-video2.tsx
+++ b/components/pages/create-to-video2.tsx
@@ -169,7 +169,7 @@ export default function CreateToVideo2() {
router.push(`/create/work-flow?episodeId=${project.project_id}`)}
+ onClick={() => router.push(`/movies/work-flow?episodeId=${project.project_id}`)}
onMouseEnter={() => handleMouseEnter(project.project_id)}
onMouseLeave={() => handleMouseLeave(project.project_id)}
data-alt="project-card"
diff --git a/components/pages/home-page2.tsx b/components/pages/home-page2.tsx
index bd639fd..0dc5484 100644
--- a/components/pages/home-page2.tsx
+++ b/components/pages/home-page2.tsx
@@ -237,7 +237,7 @@ function HomeModule1() {
className="w-[11.5rem] h-[3.75rem] mt-[4rem] text-base flex justify-center items-center font-normal border border-white rounded-full bg-white/30 cursor-pointer"
onClick={() => {
if (localStorage.getItem("token")) {
- router.push("/create");
+ router.push("/movies");
} else {
router.push("/login");
}
diff --git a/components/pages/login.tsx b/components/pages/login.tsx
index 3d7b8a8..47627b4 100644
--- a/components/pages/login.tsx
+++ b/components/pages/login.tsx
@@ -92,7 +92,7 @@ export default function Login() {
try {
await loginUser(email, password);
// 登录成功后跳转到首页
- router.push("/create");
+ router.push("/movies");
} catch (error: any) {
console.error("Login failed:", error);
diff --git a/components/pages/work-flow.tsx b/components/pages/work-flow.tsx
index 71c2ff5..fc15f17 100644
--- a/components/pages/work-flow.tsx
+++ b/components/pages/work-flow.tsx
@@ -8,13 +8,13 @@ import { MediaViewer } from "./work-flow/media-viewer";
import { ThumbnailGrid } from "./work-flow/thumbnail-grid";
import { useWorkflowData } from "./work-flow/use-workflow-data";
import { usePlaybackControls } from "./work-flow/use-playback-controls";
-import { AlertCircle, RefreshCw, Pause, Play, ChevronLast, MessageSquareText } from "lucide-react";
+import { AlertCircle, RefreshCw, Pause, Play, ChevronLast, ChevronsLeft, Bot, BriefcaseBusiness, Scissors } from "lucide-react";
import { motion } from "framer-motion";
import { GlassIconButton } from '@/components/ui/glass-icon-button';
import { SaveEditUseCase } from "@/app/service/usecase/SaveEditUseCase";
import { useSearchParams } from "next/navigation";
import SmartChatBox from "@/components/SmartChatBox/SmartChatBox";
-import { Drawer } from 'antd';
+import { Drawer, Tooltip } from 'antd';
const WorkFlow = React.memo(function WorkFlow() {
useEffect(() => {
@@ -28,6 +28,7 @@ const WorkFlow = React.memo(function WorkFlow() {
const [previewVideoUrl, setPreviewVideoUrl] = React.useState(null);
const [previewVideoId, setPreviewVideoId] = React.useState(null);
const [isFocusChatInput, setIsFocusChatInput] = React.useState(false);
+ const [isHovered, setIsHovered] = React.useState(false);
const searchParams = useSearchParams();
const episodeId = searchParams.get('episodeId') || '';
@@ -92,6 +93,7 @@ const WorkFlow = React.memo(function WorkFlow() {
isPauseWorkFlow={isPauseWorkFlow}
showGotoCutButton={showGotoCutButton}
onGotoCut={generateEditPlan}
+ setIsPauseWorkFlow={setIsPauseWorkFlow}
/>
@@ -100,41 +102,10 @@ const WorkFlow = React.memo(function WorkFlow() {
className="videoContainer-qteKNi"
ref={containerRef}
>
- {dataLoadError ? (
-
-
-
- 数据加载失败
-
-
-
- {dataLoadError}
-
-
- retryLoadData?.()}
- whileHover={{ scale: 1.05 }}
- whileTap={{ scale: 0.95 }}
- >
-
- 重试加载
-
-
- ) : isLoading ? (
+ {isLoading ? (
) : (
-
+
)}
@@ -171,35 +145,18 @@ const WorkFlow = React.memo(function WorkFlow() {
- {/* 暂停/播放按钮 */}
- {
- (taskObject.currentStage !== 'final_video') && (
-
- setIsPauseWorkFlow(!isPauseWorkFlow)}
- />
- { !mode.includes('auto') && (
-
- )}
-
- )
- }
-
{/* 智能对话按钮 */}
-
-
setIsSmartChatBoxOpen(true)}
- />
+
+
+ setIsSmartChatBoxOpen(true)}
+ className="backdrop-blur-lg"
+ />
+
{/* 智能对话弹窗 */}
diff --git a/components/pages/work-flow/media-viewer.tsx b/components/pages/work-flow/media-viewer.tsx
index bc00f00..e671f4c 100644
--- a/components/pages/work-flow/media-viewer.tsx
+++ b/components/pages/work-flow/media-viewer.tsx
@@ -2,7 +2,7 @@
import React, { useRef, useEffect, useState, SetStateAction, useMemo } from 'react';
import { motion, AnimatePresence } from 'framer-motion';
-import { Edit3, Play, Pause, Volume2, VolumeX, Maximize, Minimize, Loader2, X } from 'lucide-react';
+import { Edit3, Play, Pause, Volume2, VolumeX, Maximize, Minimize, Loader2, X, Scissors } from 'lucide-react';
import { ProgressiveReveal, presets } from '@/components/ui/progressive-reveal';
import { GlassIconButton } from '@/components/ui/glass-icon-button';
import { ScriptRenderer } from '@/components/script-renderer/ScriptRenderer';
@@ -26,6 +26,9 @@ interface MediaViewerProps {
mode: string;
onOpenChat?: () => void;
setVideoPreview?: (url: string, id: string) => void;
+ showGotoCutButton?: boolean;
+ onGotoCut: () => void;
+ isSmartChatBoxOpen: boolean;
}
export const MediaViewer = React.memo(function MediaViewer({
@@ -41,11 +44,14 @@ export const MediaViewer = React.memo(function MediaViewer({
applyScript,
mode,
onOpenChat,
- setVideoPreview
+ setVideoPreview,
+ showGotoCutButton,
+ onGotoCut,
+ isSmartChatBoxOpen
}: MediaViewerProps) {
const mainVideoRef = useRef(null);
const finalVideoRef = useRef(null);
-
+ const videoContentRef = useRef(null);
// 音量控制状态
const [isMuted, setIsMuted] = useState(false);
const [volume, setVolume] = useState(0.8);
@@ -55,6 +61,17 @@ export const MediaViewer = React.memo(function MediaViewer({
const [isFullscreen, setIsFullscreen] = useState(false);
const [finalVideoReady, setFinalVideoReady] = useState(false);
const [userHasInteracted, setUserHasInteracted] = useState(false);
+ const [toosBtnRight, setToodsBtnRight] = useState('1rem');
+
+ useEffect(() => {
+ if (isSmartChatBoxOpen) {
+ const videoContentWidth = videoContentRef.current?.clientWidth ?? 0;
+ const right = (window.innerWidth * 0.25) - ((window.innerWidth - videoContentWidth) / 2) + 32;
+ setToodsBtnRight(right + 'px');
+ } else {
+ setToodsBtnRight('1rem');
+ }
+ }, [isSmartChatBoxOpen])
// 音量控制函数
const toggleMute = () => {
@@ -421,12 +438,13 @@ export const MediaViewer = React.memo(function MediaViewer({
};
// 渲染视频内容
- const renderVideoContent = () => {
+ const renderVideoContent = (onGotoCut: () => void) => {
const urls = taskObject.videos.data[currentSketchIndex].urls ? taskObject.videos.data[currentSketchIndex].urls.join(',') : '';
return (
{/* 背景模糊的图片 */}
{taskObject.videos.data[currentSketchIndex].video_status !== 1 && (
@@ -479,22 +497,26 @@ export const MediaViewer = React.memo(function MediaViewer({
/>
- {/* 添加到chat去编辑 按钮 */}
-
-
);
};
@@ -130,7 +137,8 @@ export function TaskInfo({
roles,
isPauseWorkFlow,
showGotoCutButton,
- onGotoCut
+ onGotoCut,
+ setIsPauseWorkFlow
}: TaskInfoProps) {
const [isScriptModalOpen, setIsScriptModalOpen] = useState(false);
const [currentStage, setCurrentStage] = useState(0);
@@ -284,7 +292,7 @@ export function TaskInfo({
onMouseEnter={() => setIsStageIconsExpanded(true)}
onMouseLeave={() => setIsStageIconsExpanded(false)}
>
-
+
*/}
- {/* 跳转剪辑按钮 */}
+ {/* // 跳转剪辑按钮
{showGotoCutButton && (
- )}
+ )} */}
)}
>
diff --git a/components/ui/glass-icon-button.tsx b/components/ui/glass-icon-button.tsx
index 291b694..753380b 100644
--- a/components/ui/glass-icon-button.tsx
+++ b/components/ui/glass-icon-button.tsx
@@ -13,6 +13,7 @@ interface GlassIconButtonProps {
size?: 'sm' | 'md' | 'lg';
className?: string;
[key: string]: any; // To allow spreading other props
+ text?: string;
}
const variantStyles = {
@@ -37,12 +38,12 @@ const iconSizes = {
const MotionButton = motion.button;
export const GlassIconButton = forwardRef(
- ({ icon: Icon, tooltip, variant = 'secondary', size = 'md', className, ...props }, ref) => {
+ ({ icon: Icon, tooltip, variant = 'secondary', size = 'md', className, text, ...props }, ref) => {
return (
+ {text && (
+ {text}
+ )}
{tooltip && (