diff --git a/core/frontend/src/App.tsx b/core/frontend/src/App.tsx index f63e1ad..669d026 100644 --- a/core/frontend/src/App.tsx +++ b/core/frontend/src/App.tsx @@ -692,7 +692,7 @@ export function App() { function renderPage() { switch (page) { case "dashboard": - return ; + return action(() => api.createProduct(payload), "")} />; case "products": return ( setNotice({ type: "success", text })} onLogout={logout} />; default: - return ; + return action(() => api.createProduct(payload), "")} />; } } diff --git a/core/frontend/src/ai-tools-page.css b/core/frontend/src/ai-tools-page.css index f11a5b9..4cc3247 100644 --- a/core/frontend/src/ai-tools-page.css +++ b/core/frontend/src/ai-tools-page.css @@ -616,6 +616,22 @@ .image-workbench .p-logo-amz { background: #ff9900; } .image-workbench .p-logo-al { background: #2c4af1; } +/* ── 提示词框(YYX#7 加大)+ 框内生图模型胶囊(YYX#10 靠左置底)── */ +.image-workbench .iw-prompt-box { position: relative; } +.image-workbench .iw-prompt-text { + min-height: 148px; /* 原共享 .textarea 88px → 工作台提示词框加大 */ + padding-bottom: 42px; /* 给底部胶囊让位,文字不被遮 */ +} +.image-workbench .iw-prompt-bar { + position: absolute; + left: 10px; bottom: 10px; + display: flex; align-items: center; +} +.image-workbench .iw-model-pill { position: relative; } +.image-workbench .iw-model-pill .chip { height: 26px; } +/* 胶囊在框底 → 下拉菜单向上弹,避免被框/CTA 遮住 */ +.image-workbench .iw-model-pill .chip-menu { top: auto; bottom: calc(100% + 4px); } + /* 左栏底部 · 立即生成(主 CTA · 通栏) */ .image-workbench .iw-cta { margin-top: auto; padding-top: 14px; } .image-workbench .iw-cta .btn { @@ -669,6 +685,30 @@ font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +/* YYX#13:提示词整段较长 → 顶对齐 + 最多两行省略,不挤掉平台/张数行 */ +.image-workbench .iw-pv-h .pv-line .v.pv-prompt { + font-weight: 400; white-space: normal; + display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; +} +.image-workbench .iw-pv-h .pv-line:has(.pv-prompt) { align-items: flex-start; } + +/* YYX#5:单张失败占位 —— 灰底 + ✕ + 「重跑这张」 */ +.image-workbench .gen-image.failed .placeholder { background: var(--background-lighter); } +.image-workbench .gen-failed { + position: absolute; inset: 0; + display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; + color: var(--black-alpha-48); +} +.image-workbench .gen-failed .gf-text { font-size: 12px; } +.image-workbench .gen-failed .gf-retry { + display: inline-flex; align-items: center; gap: 4px; + height: 26px; padding: 0 10px; + border: 1px solid var(--border-faint); border-radius: 999px; + background: var(--surface); color: var(--accent-black); + font-size: 12px; cursor: pointer; + transition: background var(--t-base), border-color var(--t-base); +} +.image-workbench .gen-failed .gf-retry:hover { background: var(--heat-12); border-color: var(--heat); color: var(--heat); } /* 结果区:复用 §4.18 .gen-card 规范结构(scoped 实现 · 仅 token) */ .image-workbench .gen-card { diff --git a/core/frontend/src/routes/ai-tools.tsx b/core/frontend/src/routes/ai-tools.tsx index 9b19f57..edb1b4c 100644 --- a/core/frontend/src/routes/ai-tools.tsx +++ b/core/frontend/src/routes/ai-tools.tsx @@ -762,7 +762,6 @@ export function ImageWorkbenchPage({ (mode !== "model" || (!!product?.id && pickedIds.length > 0)) && // 平台套图:必须选商品 + 至少一个平台(P0③ 多选) (mode !== "cover" || (!!product?.id && pickedIds.length > 0)); - const anyGenerating = batches.some((b) => b.status === "generating"); /* 多批次本地持久化(行33):用 ai-tools 私有 key,不与 App 的单批 `airshelf:imgwb:{mode}` 抢同一槽。 已出图的批次直接回显;App 不可改,故"刷新时仍在跑"的批次只能尽力恢复(见回报)。 */ @@ -1291,16 +1290,11 @@ export function ImageWorkbenchPage({ 原右上「1 批·比例」与「N×」徽标系重复信息,已剔除 */}
+ {/* YYX#13:参考即梦 —— 显示用户输入的提示词 / 选择的平台 / 生成的张数 */}
- 商品 - {batchProductTitle(batch)} + 提示词 + {batch.prompt || "—"}
- {mode === "model" && batch.modelName && ( -
- 模特 - {batch.modelName} -
- )} {mode === "cover" && (
平台 @@ -1313,8 +1307,14 @@ export function ImageWorkbenchPage({
)} + {mode === "model" && batch.modelName && ( +
+ 模特 + {batch.modelName} +
+ )}
- 结果 + 张数 {batch.count} 张 · {batch.ratio} · {generating ? "生成中" : failed ? "失败" : "已完成"} {!generating && !failed && batch.results.some((a) => a.in_library) @@ -1902,12 +1902,31 @@ export function ImageWorkbenchPage({ )}
// 提示词 · 描述你想要的画面
-