Merge pull request 'Codex/fix project review bugs' (#12) from codex/fix-project-review-bugs into main
Reviewed-on: #12
This commit was merged in pull request #12.
This commit is contained in:
+1
-4
@@ -503,10 +503,7 @@ function App() {
|
|||||||
<CloseOutlined />
|
<CloseOutlined />
|
||||||
</button>
|
</button>
|
||||||
<span className="ecommerce-auth-modal__logo" aria-hidden="true">
|
<span className="ecommerce-auth-modal__logo" aria-hidden="true">
|
||||||
<i />
|
<img src="https://stringtest.oss-cn-hangzhou.aliyuncs.com/logo.png" alt="" />
|
||||||
<i />
|
|
||||||
<i />
|
|
||||||
<i />
|
|
||||||
</span>
|
</span>
|
||||||
<h2 id="ecommerce-auth-title">{authMode === "login" ? "欢迎回来" : "创建账号"}</h2>
|
<h2 id="ecommerce-auth-title">{authMode === "login" ? "欢迎回来" : "创建账号"}</h2>
|
||||||
<p className="ecommerce-auth-modal__subtitle">{authMode === "login" ? "登录后继续你的 AI 创作之旅" : "注册即可免费体验全部功能"}</p>
|
<p className="ecommerce-auth-modal__subtitle">{authMode === "login" ? "登录后继续你的 AI 创作之旅" : "注册即可免费体验全部功能"}</p>
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ const ecommerceInspirationAssets = ossAssets.ecommerce.inspiration;
|
|||||||
|
|
||||||
const ecommerceInspirationRows = [
|
const ecommerceInspirationRows = [
|
||||||
{
|
{
|
||||||
title: "AI团队",
|
title: "社区集锦",
|
||||||
desc: "不止作图,更懂转化。",
|
desc: "不止作图,更懂转化。",
|
||||||
variant: "team",
|
variant: "team",
|
||||||
cards: [
|
cards: [
|
||||||
@@ -3295,7 +3295,8 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
|
|||||||
}, [openCloneBasicSelect]);
|
}, [openCloneBasicSelect]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!composerMenu && !(status === "done" && !isCommandComposerCompact)) return undefined;
|
const shouldAutoCompactComposer = (status === "generating" || status === "done") && !isCommandComposerCompact;
|
||||||
|
if (!composerMenu && !shouldAutoCompactComposer) return undefined;
|
||||||
|
|
||||||
const handlePointerDown = (event: PointerEvent) => {
|
const handlePointerDown = (event: PointerEvent) => {
|
||||||
const target = event.target;
|
const target = event.target;
|
||||||
@@ -3304,13 +3305,19 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
|
|||||||
if (composer?.contains(target)) return;
|
if (composer?.contains(target)) return;
|
||||||
|
|
||||||
if (composerMenu && composerMenu !== "settings") setComposerMenu(null);
|
if (composerMenu && composerMenu !== "settings") setComposerMenu(null);
|
||||||
if (status === "done" && !isCommandComposerCompact) setIsCommandComposerCompact(true);
|
if (shouldAutoCompactComposer) setIsCommandComposerCompact(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
document.addEventListener("pointerdown", handlePointerDown);
|
document.addEventListener("pointerdown", handlePointerDown);
|
||||||
return () => document.removeEventListener("pointerdown", handlePointerDown);
|
return () => document.removeEventListener("pointerdown", handlePointerDown);
|
||||||
}, [composerMenu, isCommandComposerCompact, status]);
|
}, [composerMenu, isCommandComposerCompact, status]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if ((status === "generating" || status === "done") && !isCommandComposerCompact) {
|
||||||
|
setIsCommandComposerCompact(true);
|
||||||
|
}
|
||||||
|
}, [isCommandComposerCompact, status]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (composerMenuCloseTimeoutRef.current !== null) {
|
if (composerMenuCloseTimeoutRef.current !== null) {
|
||||||
window.clearTimeout(composerMenuCloseTimeoutRef.current);
|
window.clearTimeout(composerMenuCloseTimeoutRef.current);
|
||||||
@@ -4766,6 +4773,12 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const showMainVideoWorkspace = cloneOutput === "video" && isVideoWorkspaceVisible;
|
const showMainVideoWorkspace = cloneOutput === "video" && isVideoWorkspaceVisible;
|
||||||
|
const hasGenerationSurface = status === "generating" || status === "done" || canvasNodes.length > 0;
|
||||||
|
const showPreGenerationGuides =
|
||||||
|
(status === "idle" || status === "ready") &&
|
||||||
|
!showMainVideoWorkspace &&
|
||||||
|
!activeHistoryRecordId &&
|
||||||
|
canvasNodes.length === 0;
|
||||||
|
|
||||||
const scrollInspirationRow = (event: ReactMouseEvent<HTMLButtonElement>, direction: -1 | 1) => {
|
const scrollInspirationRow = (event: ReactMouseEvent<HTMLButtonElement>, direction: -1 | 1) => {
|
||||||
const row = event.currentTarget.closest(".ecom-inspiration-row");
|
const row = event.currentTarget.closest(".ecom-inspiration-row");
|
||||||
@@ -4989,23 +5002,34 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
|
|||||||
<span className="clone-ai-node-label">{node.mode === "set" ? "套图" : node.mode === "detail" ? "详情图" : node.mode === "model" ? "模特图" : node.mode === "hot" ? "爆款图" : node.mode}</span>
|
<span className="clone-ai-node-label">{node.mode === "set" ? "套图" : node.mode === "detail" ? "详情图" : node.mode === "model" ? "模特图" : node.mode === "hot" ? "爆款图" : node.mode}</span>
|
||||||
</div>
|
</div>
|
||||||
{node.sourceImage ? (
|
{node.sourceImage ? (
|
||||||
<button
|
<div className="clone-ai-source-stack">
|
||||||
type="button"
|
<button
|
||||||
className="clone-ai-main-result"
|
type="button"
|
||||||
onClick={() => openProductSetPreview({ src: node.sourceImage!, label: "原图素材" })}
|
className="clone-ai-source-corner-action"
|
||||||
>
|
onClick={() => openProductSetPreview({ src: node.sourceImage!, label: "原图素材" })}
|
||||||
<img src={node.sourceImage} alt="原图素材" />
|
>
|
||||||
<span>原图素材</span>
|
原图素材
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="clone-ai-main-result"
|
||||||
|
aria-label="预览原图素材"
|
||||||
|
onClick={() => openProductSetPreview({ src: node.sourceImage!, label: "原图素材" })}
|
||||||
|
>
|
||||||
|
<img src={node.sourceImage} alt="原图素材" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
<div className="clone-ai-flow-arrow" aria-hidden="true" />
|
<div className="clone-ai-flow-arrow" aria-hidden="true" />
|
||||||
<div className="clone-ai-result-grid result-reveal">
|
<div className="clone-ai-result-stack">
|
||||||
{node.results.map((card) => (
|
<div className="clone-ai-result-grid result-reveal">
|
||||||
<button key={card.id} type="button" style={{ aspectRatio: parseRatioToAspectCss(ratio) }} onClick={() => openProductSetPreview(card, { nodeId: node.id, removable: true })}>
|
{node.results.map((card) => (
|
||||||
<img src={card.src} alt={card.label} />
|
<button key={card.id} type="button" style={{ aspectRatio: parseRatioToAspectCss(ratio) }} onClick={() => openProductSetPreview(card, { nodeId: node.id, removable: true })}>
|
||||||
<span>{card.label}</span>
|
<img src={card.src} alt={card.label} />
|
||||||
</button>
|
<span>{card.label}</span>
|
||||||
))}
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
))}
|
))}
|
||||||
@@ -5041,16 +5065,18 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
|
|||||||
|
|
||||||
<section
|
<section
|
||||||
ref={commandComposerWrapRef}
|
ref={commandComposerWrapRef}
|
||||||
className={`clone-ai-bottom-input ecom-command-composer-wrap${status === "done" || canvasNodes.length > 0 ? " has-generated" : " is-before-generate"}${isCommandComposerCompact && (status === "done" || canvasNodes.length > 0) ? " is-compact" : ""}`}
|
className={`clone-ai-bottom-input ecom-command-composer-wrap${hasGenerationSurface ? " has-generated" : " is-before-generate"}${isCommandComposerCompact && hasGenerationSurface ? " is-compact" : ""}`}
|
||||||
aria-label="生成指令"
|
aria-label="生成指令"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (isCommandComposerCompact) setIsCommandComposerCompact(false);
|
if (isCommandComposerCompact && status !== "generating") setIsCommandComposerCompact(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<h1 className={`ecom-command-title${status === "done" || canvasNodes.length > 0 ? " is-after-generate" : ""}`}>
|
{!hasGenerationSurface ? (
|
||||||
{typewriterText}
|
<h1 className="ecom-command-title">
|
||||||
<span className="typewriter-cursor" aria-hidden="true">|</span>
|
{typewriterText}
|
||||||
</h1>
|
<span className="typewriter-cursor" aria-hidden="true">|</span>
|
||||||
|
</h1>
|
||||||
|
) : null}
|
||||||
<input
|
<input
|
||||||
ref={cloneReferenceInputRef}
|
ref={cloneReferenceInputRef}
|
||||||
type="file"
|
type="file"
|
||||||
@@ -5185,7 +5211,7 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
|
|||||||
</div>
|
</div>
|
||||||
{renderComposerMenu()}
|
{renderComposerMenu()}
|
||||||
</div>
|
</div>
|
||||||
{(status === "idle" || status === "ready") && !showMainVideoWorkspace ? (
|
{showPreGenerationGuides ? (
|
||||||
<section className="ecom-command-quick-board" aria-label="快捷功能">
|
<section className="ecom-command-quick-board" aria-label="快捷功能">
|
||||||
{[
|
{[
|
||||||
{ label: "A+/详情页", tone: "detail", icon: <LayoutOutlined />, onClick: openQuickDetailPage },
|
{ label: "A+/详情页", tone: "detail", icon: <LayoutOutlined />, onClick: openQuickDetailPage },
|
||||||
@@ -5210,7 +5236,7 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
|
|||||||
))}
|
))}
|
||||||
</section>
|
</section>
|
||||||
) : null}
|
) : null}
|
||||||
{(status === "idle" || status === "ready") && !showMainVideoWorkspace ? (
|
{showPreGenerationGuides ? (
|
||||||
<section className="ecom-inspiration-lab" aria-label="电商灵感案例">
|
<section className="ecom-inspiration-lab" aria-label="电商灵感案例">
|
||||||
<div className="ecom-inspiration-rows">
|
<div className="ecom-inspiration-rows">
|
||||||
{ecommerceInspirationRows.map((row) => (
|
{ecommerceInspirationRows.map((row) => (
|
||||||
|
|||||||
@@ -455,19 +455,28 @@
|
|||||||
|
|
||||||
.ecommerce-auth-modal__logo {
|
.ecommerce-auth-modal__logo {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
width: 58px;
|
width: 58px;
|
||||||
height: 58px;
|
height: 58px;
|
||||||
margin: 0 auto 14px;
|
margin: 0 auto 14px;
|
||||||
overflow: hidden;
|
overflow: visible;
|
||||||
border-radius: 13px;
|
border-radius: 0;
|
||||||
|
background: transparent;
|
||||||
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ecommerce-auth-modal__logo i {
|
.ecommerce-auth-modal__logo img {
|
||||||
position: absolute;
|
display: block;
|
||||||
width: 35px;
|
width: 58px;
|
||||||
height: 35px;
|
height: 58px;
|
||||||
border-radius: 10px;
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ecommerce-auth-modal__logo i,
|
||||||
|
.ecommerce-auth-modal__logo::before {
|
||||||
|
content: none !important;
|
||||||
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ecommerce-auth-modal__logo i:nth-child(1) {
|
.ecommerce-auth-modal__logo i:nth-child(1) {
|
||||||
@@ -2832,7 +2841,7 @@
|
|||||||
|
|
||||||
.ecommerce-standalone .product-clone-page[data-tool="clone"] .clone-ai-canvas-node .clone-ai-main-result {
|
.ecommerce-standalone .product-clone-page[data-tool="clone"] .clone-ai-canvas-node .clone-ai-main-result {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
width: 120px;
|
width: 150px;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: 1px solid rgba(30, 189, 219, 0.12);
|
border: 1px solid rgba(30, 189, 219, 0.12);
|
||||||
@@ -2854,12 +2863,50 @@
|
|||||||
padding: 4px;
|
padding: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ecommerce-standalone .product-clone-page[data-tool="clone"] .clone-ai-canvas-node .clone-ai-source-stack {
|
||||||
|
position: relative;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
.ecommerce-standalone .product-clone-page[data-tool="clone"] .clone-ai-canvas-node .clone-ai-result-grid {
|
.ecommerce-standalone .product-clone-page[data-tool="clone"] .clone-ai-canvas-node .clone-ai-result-grid {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ecommerce-standalone .product-clone-page[data-tool="clone"] .clone-ai-canvas-node .clone-ai-result-stack {
|
||||||
|
position: relative;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ecommerce-standalone .product-clone-page[data-tool="clone"] .clone-ai-canvas-node .clone-ai-source-corner-action {
|
||||||
|
position: absolute;
|
||||||
|
top: -6px;
|
||||||
|
left: 50%;
|
||||||
|
z-index: 5;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
min-height: 24px;
|
||||||
|
padding: 4px 9px;
|
||||||
|
border: 1px solid rgba(30, 189, 219, 0.22);
|
||||||
|
border-radius: 999px;
|
||||||
|
background: rgba(255, 255, 255, 0.96);
|
||||||
|
box-shadow: 0 6px 18px rgba(16, 115, 204, 0.12);
|
||||||
|
color: #188ba7;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 1;
|
||||||
|
white-space: nowrap;
|
||||||
|
cursor: pointer;
|
||||||
|
transform: translate(-50%, -100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ecommerce-standalone .product-clone-page[data-tool="clone"] .clone-ai-canvas-node .clone-ai-source-corner-action:hover {
|
||||||
|
border-color: rgba(30, 189, 219, 0.45);
|
||||||
|
color: #0f7895;
|
||||||
|
}
|
||||||
|
|
||||||
.ecommerce-standalone .product-clone-page[data-tool="clone"] .clone-ai-canvas-node .clone-ai-result-grid button {
|
.ecommerce-standalone .product-clone-page[data-tool="clone"] .clone-ai-canvas-node .clone-ai-result-grid button {
|
||||||
width: 140px;
|
width: 140px;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
|
|||||||
@@ -2930,12 +2930,59 @@
|
|||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-canvas-node .clone-ai-main-result {
|
||||||
|
width: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-source-stack {
|
||||||
|
position: relative;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
.product-clone-page[data-tool="clone"] .clone-ai-result-grid {
|
.product-clone-page[data-tool="clone"] .clone-ai-result-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
gap: 14px;
|
gap: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-result-stack {
|
||||||
|
position: relative;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-source-corner-action {
|
||||||
|
position: absolute;
|
||||||
|
top: -6px;
|
||||||
|
left: 50%;
|
||||||
|
z-index: 5;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
min-height: 28px;
|
||||||
|
padding: 6px 12px;
|
||||||
|
border: 1px solid rgba(0, 255, 136, 0.35);
|
||||||
|
border-radius: 999px;
|
||||||
|
background: rgba(21, 23, 28, 0.92);
|
||||||
|
box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
|
||||||
|
color: #d8deed;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 900;
|
||||||
|
line-height: 1;
|
||||||
|
white-space: nowrap;
|
||||||
|
cursor: pointer;
|
||||||
|
transform: translate(-50%, -100%);
|
||||||
|
transition:
|
||||||
|
border-color 200ms ease,
|
||||||
|
transform 200ms ease,
|
||||||
|
box-shadow 200ms ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-source-corner-action:hover {
|
||||||
|
border-color: #00ff88;
|
||||||
|
transform: translate(-50%, -106%);
|
||||||
|
box-shadow: 0 10px 26px rgba(0, 255, 136, 0.14), 0 8px 22px rgba(0, 0, 0, 0.28);
|
||||||
|
}
|
||||||
|
|
||||||
.product-clone-page[data-tool="clone"] .clone-ai-result-grid button {
|
.product-clone-page[data-tool="clone"] .clone-ai-result-grid button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
|||||||
Reference in New Issue
Block a user