From 568cb65cf32cc02e18bb11d5f32a6e2171ad341a 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: Mon, 13 Oct 2025 20:19:49 +0800 Subject: [PATCH] =?UTF-8?q?loading=E5=8A=A8=E7=94=BB=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/layout.tsx | 1 + components/pages/work-flow/H5MediaViewer.tsx | 34 +- components/pages/work-flow/RenderLoading.tsx | 448 ++++++++++++++++++ components/pages/work-flow/media-viewer.tsx | 26 +- components/pages/work-flow/thumbnail-grid.tsx | 17 +- iconfont/iconfont.css | 23 + iconfont/iconfont.ttf | Bin 0 -> 2428 bytes iconfont/iconfont.woff | Bin 0 -> 1664 bytes iconfont/iconfont.woff2 | Bin 0 -> 1248 bytes 9 files changed, 518 insertions(+), 31 deletions(-) create mode 100644 components/pages/work-flow/RenderLoading.tsx create mode 100644 iconfont/iconfont.css create mode 100644 iconfont/iconfont.ttf create mode 100644 iconfont/iconfont.woff create mode 100644 iconfont/iconfont.woff2 diff --git a/app/layout.tsx b/app/layout.tsx index 9631a78..71bf208 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,5 +1,6 @@ 'use client' import './globals.css'; +import '@/iconfont/iconfont.css'; import { createContext, useContext, useEffect, useState } from 'react'; import { Providers } from '@/components/providers'; import { ConfigProvider, theme } from 'antd'; diff --git a/components/pages/work-flow/H5MediaViewer.tsx b/components/pages/work-flow/H5MediaViewer.tsx index ec2cc51..3ce95a7 100644 --- a/components/pages/work-flow/H5MediaViewer.tsx +++ b/components/pages/work-flow/H5MediaViewer.tsx @@ -14,6 +14,7 @@ import { Drawer } from 'antd'; import { useSearchParams } from 'next/navigation'; import error_image from '@/public/assets/error.webp'; import { showDownloadOptionsModal } from './download-options-modal'; +import RenderLoading from './RenderLoading'; interface H5MediaViewerProps { /** 任务对象,包含各阶段数据 */ @@ -150,9 +151,10 @@ export function H5MediaViewer({ return [...roles, ...scenes].map(item => ({ url: item?.url as string | undefined, status: item?.status as number | undefined, + type: item?.type as string | undefined, })); } - return [] as Array<{ url?: string; status?: number }>; + return [] as Array<{ url?: string; status?: number; type?: string }>; }, [stage, taskObject.roles?.data, taskObject.scenes?.data]); // 占位,避免未使用警告 @@ -266,18 +268,19 @@ export function H5MediaViewer({
- {status === 0 && ( - Generating... + {(status === 0 || status === 2) && ( + )} - {status === 2 && ( + {/* {status === 2 && (
error Generate failed
- )} - {status !== 0 && status !== 2 && ( - Pending - )} + )} */}
)} @@ -315,15 +318,19 @@ export function H5MediaViewer({
- {status === 0 && ( - Generating... + {(status === 0 || status === 2) && ( + )} - {status === 2 && ( + {/* {status === 2 && (
error Generate failed
- )} + )} */}
)} @@ -544,8 +551,9 @@ export function H5MediaViewer({ )} +
+
+ {/* Vinyl Record Container */} +
+ {/* Record Half - Top */} +
+ {/* Record grooves effect */} +
+ + {/* Scanner light */} +
+ + {/* Center label */} +
+ {/* Pulsing core */} +
+
+
+ + {/* Record Half - Bottom */} +
+ {/* Record grooves effect */} +
+ + {/* Scanner light */} +
+ + {/* Center label */} +
+ {/* Pulsing core */} +
+
+
+
+ + {/* Tonearm */} +
+ {/* Arm */} +
+ + {/* Head */} +
+ + {/* Pivot */} +
+
+
+ {/* 加载/失败文案 */} +
+ {loadingText} +
+
+ + ); +}; + +export default RenderLoading; + diff --git a/components/pages/work-flow/media-viewer.tsx b/components/pages/work-flow/media-viewer.tsx index d6ef89a..2c99514 100644 --- a/components/pages/work-flow/media-viewer.tsx +++ b/components/pages/work-flow/media-viewer.tsx @@ -18,8 +18,7 @@ import { VideoEditOverlay } from './video-edit/VideoEditOverlay'; import { EditPoint as EditPointType } from './video-edit/types'; import { isVideoModificationEnabled } from '@/lib/server-config'; import { useSearchParams } from 'next/navigation'; -import error_image from '@/public/assets/error.webp'; -import { AspectRatioValue } from '@/components/ChatInputBox/AspectRatioSelector'; +import RenderLoading from './RenderLoading'; interface MediaViewerProps { taskObject: TaskObject; @@ -573,14 +572,16 @@ export const MediaViewer = React.memo(function MediaViewer({ {taskObject.videos.data[currentSketchIndex].video_status !== 1 && (
{/* 生成中 */} - {taskObject.videos.data[currentSketchIndex].video_status === 0 && ( - renderLoading() + {(taskObject.videos.data[currentSketchIndex].video_status === 0 || taskObject.videos.data[currentSketchIndex].video_status === 2) && ( + )} {/* 生成失败 */} - {taskObject.videos.data[currentSketchIndex].video_status === 2 && ( + {/* {taskObject.videos.data[currentSketchIndex].video_status === 2 && (
error - {/* 文案 */}
Failed @@ -588,7 +589,7 @@ export const MediaViewer = React.memo(function MediaViewer({
Violation of security policy. Please modify your prompt and regenerate.
- )} + )} */}
)} @@ -778,14 +779,17 @@ export const MediaViewer = React.memo(function MediaViewer({ }} > {/* 状态 */} - {currentSketch.status === 0 && ( - renderLoading() + {(currentSketch.status === 0 || currentSketch.status === 2) && ( + )} - {currentSketch.status === 2 && ( + {/* {currentSketch.status === 2 && (
error
- )} + )} */} {/* 只在生成过程中或没有分镜图片时使用ProgressiveReveal */} {currentSketch.status === 1 && ( diff --git a/components/pages/work-flow/thumbnail-grid.tsx b/components/pages/work-flow/thumbnail-grid.tsx index 4972520..12200c4 100644 --- a/components/pages/work-flow/thumbnail-grid.tsx +++ b/components/pages/work-flow/thumbnail-grid.tsx @@ -5,7 +5,6 @@ import { CircleAlert, Film } from 'lucide-react'; import { TaskObject } from '@/api/DTO/movieEdit'; import { getFirstFrame } from '@/utils/tools'; import { AspectRatioValue } from '@/components/ChatInputBox/AspectRatioSelector'; -import error_image from '@/public/assets/error.webp'; interface ThumbnailGridProps { isDisabledFocus: boolean; @@ -52,7 +51,7 @@ export function ThumbnailGrid({ const [scrollLeft, setScrollLeft] = useState(0); const [isFocused, setIsFocused] = useState(false); - // 监听当前选中索引变化,自动滚动到对应位置 + // 监听当前选中索引变化,自动滚动到对应位置(居中显示) useEffect(() => { if (thumbnailsRef.current) { const container = thumbnailsRef.current; @@ -60,9 +59,13 @@ export function ThumbnailGrid({ if (currentSketchIndex >= 0 && currentSketchIndex < thumbnails.length) { const thumbnail = thumbnails[currentSketchIndex] as HTMLElement; - const containerLeft = container.getBoundingClientRect().left; - const thumbnailLeft = thumbnail.getBoundingClientRect().left; - const scrollPosition = container.scrollLeft + (thumbnailLeft - containerLeft); + const containerRect = container.getBoundingClientRect(); + const thumbnailRect = thumbnail.getBoundingClientRect(); + + // 计算滚动位置:将缩略图居中显示 + const containerCenter = containerRect.width / 2; + const thumbnailCenter = thumbnailRect.width / 2; + const scrollPosition = container.scrollLeft + (thumbnailRect.left - containerRect.left) - containerCenter + thumbnailCenter; container.scrollTo({ left: scrollPosition, @@ -266,7 +269,7 @@ export function ThumbnailGrid({ )} {taskObject.videos.data[index].video_status === 2 && (
- error +
)} @@ -340,7 +343,7 @@ export function ThumbnailGrid({ )} {sketch.status === 2 && (
- error +
)} {/* 只在生成过程中或没有分镜图片时使用ProgressiveReveal */} diff --git a/iconfont/iconfont.css b/iconfont/iconfont.css new file mode 100644 index 0000000..1473cf6 --- /dev/null +++ b/iconfont/iconfont.css @@ -0,0 +1,23 @@ +@font-face { + font-family: "iconfont"; /* Project id 5039410 */ + src: url('./iconfont.woff2?t=1760340285776') format('woff2'), + url('./iconfont.woff?t=1760340285776') format('woff'), + url('./iconfont.ttf?t=1760340285776') format('truetype'); +} + +.iconfont { + font-family: "iconfont" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-shipindiushibaojing:before { + content: "\e618"; +} + +.icon-tudiushi:before { + content: "\e717"; +} + diff --git a/iconfont/iconfont.ttf b/iconfont/iconfont.ttf new file mode 100644 index 0000000000000000000000000000000000000000..624634ef02f04bf6829e8fcf9a52cd689dde85f9 GIT binary patch literal 2428 zcmd^ATW?!M5T4yVciYGIiG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y|o3volf&$EAR;5sR)migWmpsfLtK^AAamliWq1XwF9`X zQ#UeVSz%TitYN}lLNN?Jo994laZ+cOHFM?ijeIU_ir!^xq|v#Q?jqx)8AEqbS$J3aEtxhbS| zR&ez4AwOwdhd?ihZ3d_J?lEZWYhl`L&od312slJHp*<{SZORYn@uu8-qh|l|nt;`h zz~x>+AH99I5|irR&0T^GoQdBpt1l%Dn8|-kE8=DIig;}227s%e*?r>v~U0b literal 0 HcmV?d00001 diff --git a/iconfont/iconfont.woff2 b/iconfont/iconfont.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..c68a25ea1892d6a72780552e721fd84e3a8d78a9 GIT binary patch literal 1248 zcmV<61Rwi%Pew8T0RR9100iIw3jhEB0112m00ff&0RR9100000000000000000000 z0000SR0d!Gg9ZwQM1?*9HUcCA3=0SV1Rw>3X9q|dEC|RRk|ZVCDQ9vxKwY_yR}c^X zu6^E@WM&ZyOb%rgq5=|TtB75Nt0OX^$0K=Ce?GnU3i;|y!Wdoh^TU_iFE(+Nw|ehH zPte-6qX*y1Pwt#rE+2i_M#7#-YgahP{m9?To1X?YW!+gC@RTFSNmX2lM&ytXXyfu#Hb0n}G+m#+pXg1Z_l||eD73m`D z3gCMD`S>j%Y)Pt2_Stf@m;rmwe4kV7?*Ah|ej_9aI69$1#@sV=#@>Gab{1)VE(@(~ zdP}OU6(Q|4_5VMyd}*xD`Hz=~n&{h+G1HpdDTNage5Yh+aR1j)qZ^2s0K{fw^jEg3 zSEvasrK4rO(6OaurF59tfY5Xj`BS8UeLsz3S{Ymqmm9YdtQ-gZqlh-bStkgz>gz}S zw6!NNbO+%%pgWCXL$MTTq0=hvKnrm`8AC?V_?l7_gJ~0ld^AeTQ7BVMB&u6KK^QhZ zUNw!+>m9L5ylcowylZlu!6ubig~_=&idr(iG?ABiyU;*WL4OEZ7a}UhMw#8S{V? z9=z`ChEiS-Ebk*J2Tho$4&ClFWVm}jRK&Nq)s53WJzniFH*cg?)MqQ|ud`M=(M%e? z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