Peach: Local-first video metadata scraper and media manager.
fix(web): 宽容器中的补全提示与操作并排显示
Peach local maintenancea125df701e47
diff --git a/frontend/e2e/library-completion.test.ts b/frontend/e2e/library-completion.test.tsindex 61d859325..ba51c6519 100644--- a/frontend/e2e/library-completion.test.ts+++ b/frontend/e2e/library-completion.test.ts@@ -51,11 +51,21 @@ describe('缺预览时的统一补全入口', () => {text: text.getBoundingClientRect().toJSON(), action: action.getBoundingClientRect().toJSON() };});assert.ok(placement.inline && placement.arrow, JSON.stringify(placement));- assert.ok(placement.action.top >= placement.text.bottom + 8, JSON.stringify(placement));- assert.ok(Math.abs(placement.action.left - placement.text.left) < 1, JSON.stringify(placement));+ if (viewport.mobile) {+ assert.ok(placement.action.top >= placement.text.bottom + 8, JSON.stringify(placement));+ assert.ok(Math.abs(placement.action.left - placement.text.left) < 1, JSON.stringify(placement));+ } else {+ assert.ok(placement.action.left >= placement.text.right + 8,+ `宽容器中按钮应位于说明右侧:${JSON.stringify(placement)}`);+ assert.ok(placement.action.top < placement.text.bottom,+ `宽容器中按钮不应另起一行:${JSON.stringify(placement)}`);+ }await prompt.evaluate(element => { element.style.width = '320px' });const narrowText = await prompt.locator('p').boundingBox();+ const narrowAction = await prompt.locator('[data-note-action]').boundingBox();assert.ok(narrowText && narrowText.width >= 280, '窄容器中的提示正文应独占一行宽度');+ assert.ok(narrowAction && narrowAction.y >= narrowText.y + narrowText.height + 8,+ '窄容器中按钮应退到说明下方');await prompt.evaluate(element => { element.style.width = '' });if (viewport.mobile) {const text = await prompt.locator('p').boundingBox();diff --git a/frontend/src/react/library-processing/library-completion.tsx b/frontend/src/react/library-processing/library-completion.tsxindex 63f5b6a94..17258715b 100644--- a/frontend/src/react/library-processing/library-completion.tsx+++ b/frontend/src/react/library-processing/library-completion.tsx@@ -65,7 +65,7 @@ function Completion({ assetIds, onComplete }: { assetIds: number[]; onComplete?(const message = problem || (start.isPending ? '正在启动补全…': outcome || `这批影片中有 ${assetIds.length.toLocaleString()} 部暂无预览,可补全资料与图片。`);return <section aria-label="补全预览" aria-live="polite" data-library-completion="" className="@container mb-4">- <Note tone={problem ? 'warning' : 'neutral'} actionLayout="below" action={<div className="flex flex-wrap items-center gap-2"><ProcessingActions busy={busy} metadataOnly={state?.metadata_only} onRun={command => {+ <Note tone={problem ? 'warning' : 'neutral'} action={<div className="flex flex-wrap items-center gap-2"><ProcessingActions busy={busy} metadataOnly={state?.metadata_only} onRun={command => {if (busy) return;setOutcome('');start.mutate(command);diff --git a/web/dist/peach-app.js b/web/dist/peach-app.jsindex 1c60047be..158d7e8a3 100644--- a/web/dist/peach-app.js+++ b/web/dist/peach-app.js@@ -53467,7 +53467,6 @@ function Rwe({ assetIds: e, onComplete: t }) {className: "@container mb-4",children: /* @__PURE__ */ (0, C.jsxs)(J, {tone: d ? "warning" : "neutral",- actionLayout: "below",action: /* @__PURE__ */ (0, C.jsx)("div", {className: "flex flex-wrap items-center gap-2",children: /* @__PURE__ */ (0, C.jsx)(yI, {