diff --git a/src/App.tsx b/src/App.tsx index c79923d..82369d2 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -347,6 +347,8 @@ function App() { toast.info("Bug 反馈入口已保留,后续可接入反馈页面。"); }; + const shouldShowEcommerceTopbar = currentPage === "workspace" && !workspaceChrome.isToolPage; + return (
- + {shouldShowEcommerceTopbar ? ( + + ) : null}
{session ? ( diff --git a/src/features/ecommerce/EcommercePage.tsx b/src/features/ecommerce/EcommercePage.tsx index 9390eec..b2378a9 100644 --- a/src/features/ecommerce/EcommercePage.tsx +++ b/src/features/ecommerce/EcommercePage.tsx @@ -1,5 +1,7 @@ import { AppstoreOutlined, + AppstoreAddOutlined, + BorderOuterOutlined, ClearOutlined, CloudUploadOutlined, CloseOutlined, @@ -7,14 +9,17 @@ import { EditOutlined, FireOutlined, FileImageOutlined, + FileTextOutlined, FolderOpenOutlined, FrownOutlined, GlobalOutlined, + HighlightOutlined, LayoutOutlined, LoadingOutlined, MenuFoldOutlined, MenuUnfoldOutlined, PaperClipOutlined, + PlayCircleOutlined, PlusOutlined, QuestionCircleOutlined, ReloadOutlined, @@ -22,6 +27,7 @@ import { SettingOutlined, SkinOutlined, TableOutlined, + TranslationOutlined, VideoCameraOutlined, } from "@ant-design/icons"; import { @@ -256,6 +262,7 @@ import { interface ProductClonePageProps { + onWorkspaceChromeChange?: (state: { isToolPage: boolean }) => void; [key: string]: unknown; } @@ -811,7 +818,7 @@ const cloneSetCountOptions: Array<{ const cloneSetCountKeys = cloneSetCountOptions.map((option) => option.key); const minCloneSetTotal = 1; const maxCloneSetTotal = 16; -const maxCloneProductImages = 20; +const maxCloneProductImages = 10; const maxCloneReferenceImages = 20; const cloneVideoDurationMin = 5; const cloneVideoDurationMax = 45; @@ -1084,6 +1091,7 @@ function mergeEcommerceHistoryRecords(...recordGroups: EcommerceHistoryRecord[][ } function ProductClonePage(_props: ProductClonePageProps = {}) { + const { onWorkspaceChromeChange } = _props; const setInputRef = useRef(null); const productInputRef = useRef(null); const cloneReferenceInputRef = useRef(null); @@ -2939,7 +2947,13 @@ function ProductClonePage(_props: ProductClonePageProps = {}) { const imageFiles = notifyRejectedImages(files); if (!imageFiles.length) return; const remainingSlots = maxCloneProductImages - productImages.length; - if (remainingSlots <= 0) return; + if (remainingSlots <= 0) { + toast.info(`最多上传 ${maxCloneProductImages} 张素材`); + return; + } + if (imageFiles.length > remainingSlots) { + toast.info(`最多上传 ${maxCloneProductImages} 张素材,已自动保留前 ${remainingSlots} 张`); + } const localItems = createLocalImageItems(imageFiles, remainingSlots, "product"); setProductImages((current) => [...current, ...localItems].slice(0, maxCloneProductImages)); @@ -4668,6 +4682,29 @@ function ProductClonePage(_props: ProductClonePageProps = {}) { const isQuickSetTool = isCloneTool && activeQuickTool === "quick-set"; const isCopywritingTool = isCloneTool && activeQuickTool === "copywriting"; const isOneClickVideoTool = isCloneTool && activeQuickTool === "oneClickVideo"; + const isWorkspaceToolPage = + !isCloneTool || + isSmartCutoutTool || + isQuickDetailTool || + isWatermarkTool || + isTranslateTool || + isImageEditTool || + isHotCloneTool || + isQuickSetTool || + isCopywritingTool || + isOneClickVideoTool || + isVideoWorkspaceVisible || + Boolean(activeHistoryRecordId); + + useEffect(() => { + onWorkspaceChromeChange?.({ isToolPage: isWorkspaceToolPage }); + }, [isWorkspaceToolPage, onWorkspaceChromeChange]); + + useEffect(() => { + return () => { + onWorkspaceChromeChange?.({ isToolPage: false }); + }; + }, [onWorkspaceChromeChange]); const pageLabel = isSetTool ? "商品套图" : isDetail ? "A+/详情页" : isTryOn ? "AI服饰穿戴" : activeToolMeta?.label || "商品工具"; const setPrimaryLabel = setImages.length === 0 @@ -6328,7 +6365,13 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {