调整工作流样式布局

This commit is contained in:
北枳 2025-08-17 14:05:07 +08:00
parent 09fc676a35
commit 89a3a0cc3a
4 changed files with 89 additions and 89 deletions

View File

@ -159,6 +159,10 @@
display: flex; display: flex;
overflow: hidden; overflow: hidden;
min-height: 0; min-height: 0;
display: grid;
grid-auto-rows: auto;
justify-content: center;
} }
.videoContainer-qteKNi { .videoContainer-qteKNi {
flex: 1; flex: 1;
@ -166,13 +170,14 @@
display: flex; display: flex;
position: relative; position: relative;
justify-content: center; justify-content: center;
width: max-content;
} }
.heroVideo-FIzuK1 { .heroVideo-FIzuK1 {
object-fit: cover; object-fit: cover;
object-position: center; object-position: center;
background-color: #0003; background-color: #0003;
border-radius: 8px; border-radius: 8px;
width: 100%;
height: 100%; height: 100%;
} }
.container-kIPoeH { .container-kIPoeH {

View File

@ -21,7 +21,6 @@ const WorkFlow = React.memo(function WorkFlow() {
console.log("init-WorkFlow"); console.log("init-WorkFlow");
return () => console.log("unmount-WorkFlow"); return () => console.log("unmount-WorkFlow");
}, []); }, []);
const containerRef = useRef<HTMLDivElement>(null); const containerRef = useRef<HTMLDivElement>(null);
const [isEditModalOpen, setIsEditModalOpen] = React.useState(false); const [isEditModalOpen, setIsEditModalOpen] = React.useState(false);
const [activeEditTab, setActiveEditTab] = React.useState('1'); const [activeEditTab, setActiveEditTab] = React.useState('1');
@ -92,8 +91,7 @@ const WorkFlow = React.memo(function WorkFlow() {
return ( return (
<ErrorBoundary> <ErrorBoundary>
<div className="w-full overflow-hidden h-[calc(100vh-6rem)] absolute top-[4rem] left-0 right-0 px-[1rem]"> <div className="w-full overflow-hidden h-[calc(100vh-6rem)] absolute top-[4rem] left-0 right-0 px-[1rem]">
<div className="flex h-full flex-col justify-start items-center"> <div className="w-full h-full">
<div className="container-H2sRZG">
<div className="splashContainer-otuV_A"> <div className="splashContainer-otuV_A">
<div className="content-vPGYx8"> <div className="content-vPGYx8">
<div className="info-UUGkPJ"> <div className="info-UUGkPJ">
@ -148,7 +146,7 @@ const WorkFlow = React.memo(function WorkFlow() {
) : isLoading ? ( ) : isLoading ? (
<Skeleton className="w-full aspect-video rounded-lg" /> <Skeleton className="w-full aspect-video rounded-lg" />
) : ( ) : (
<div className="heroVideo-FIzuK1" style={{ aspectRatio: "16 / 9" }} key={currentSketchIndex}> <div className={`heroVideo-FIzuK1 ${['final_video', 'script'].includes(taskObject.currentStage) ? 'h-[calc(100vh-6rem)] w-[calc((100vh-6rem)/9*16)]' : 'h-[calc(100vh-6rem-200px)] w-[calc((100vh-6rem-200px)/9*16)]'}`} style={{ aspectRatio: "16 / 9" }} key={currentSketchIndex}>
<ErrorBoundary> <ErrorBoundary>
<MediaViewer <MediaViewer
taskObject={taskObject} taskObject={taskObject}
@ -168,8 +166,7 @@ const WorkFlow = React.memo(function WorkFlow() {
)} )}
</div> </div>
{taskObject.currentStage !== 'final_video' && taskObject.currentStage !== 'script' && ( {taskObject.currentStage !== 'final_video' && taskObject.currentStage !== 'script' && (
<div className="imageGrid-ymZV9z hide-scrollbar"> <div className="h-[112px] w-[calc((100vh-6rem-200px)/9*16)]">
<ErrorBoundary>
<ThumbnailGrid <ThumbnailGrid
isEditModalOpen={isEditModalOpen} isEditModalOpen={isEditModalOpen}
taskObject={taskObject} taskObject={taskObject}
@ -183,14 +180,12 @@ const WorkFlow = React.memo(function WorkFlow() {
totalSketchCount={totalSketchCount} totalSketchCount={totalSketchCount}
onSketchSelect={setCurrentSketchIndex} onSketchSelect={setCurrentSketchIndex}
/> />
</ErrorBoundary>
</div> </div>
)} )}
</div> </div>
</div> </div>
</div> </div>
</div>
{/* 暂停/播放按钮 */} {/* 暂停/播放按钮 */}
{ {

View File

@ -137,7 +137,7 @@ export const MediaViewer = React.memo(function MediaViewer({
return ( return (
<video <video
ref={finalVideoRef} ref={finalVideoRef}
className="w-[auto] h-full object-cover rounded-lg" className="w-full h-full object-cover rounded-lg"
src={taskObject.final.url} src={taskObject.final.url}
autoPlay={isFinalVideoPlaying} autoPlay={isFinalVideoPlaying}
loop loop
@ -305,7 +305,7 @@ export const MediaViewer = React.memo(function MediaViewer({
transition={{ duration: 0.8, ease: "easeInOut" }} transition={{ duration: 0.8, ease: "easeInOut" }}
> >
<video <video
className="w-[auto] h-full rounded-lg object-cover object-center" className="w-full h-full rounded-lg object-cover object-center"
src={taskObject.final.url} src={taskObject.final.url}
loop loop
playsInline playsInline

View File

@ -366,7 +366,7 @@ export function ThumbnailGrid({
<div <div
ref={thumbnailsRef} ref={thumbnailsRef}
tabIndex={0} tabIndex={0}
className="w-full grid grid-flow-col auto-cols-[20%] gap-4 overflow-x-auto hide-scrollbar px-1 py-1 cursor-grab active:cursor-grabbing focus:outline-none select-none" className="w-full h-full grid grid-flow-col auto-cols-[20%] gap-4 overflow-x-auto hide-scrollbar px-1 py-1 cursor-grab active:cursor-grabbing focus:outline-none select-none"
autoFocus autoFocus
onMouseDown={handleMouseDown} onMouseDown={handleMouseDown}
onMouseMove={handleMouseMove} onMouseMove={handleMouseMove}