diff --git a/internal/gui/assets/plugins/redact/redact.css b/internal/gui/assets/plugins/redact/redact.css index 2e7120ffb..901ec407b 100644 --- a/internal/gui/assets/plugins/redact/redact.css +++ b/internal/gui/assets/plugins/redact/redact.css @@ -255,7 +255,7 @@ body.window .msk-onebar::before { inset: -6px -16px; } /* How masking works (demo.js): a row that opens onto 小鹊 taking one request through. Her video is drawn on the card's colour, one take per theme; the stage is laid out at 1000×420 and scaled to the card */ -.msk-demo { flex: none; border-radius: 14px; border: 1px solid var(--line); background: var(--card); overflow: hidden; } +.msk-demo { flex: none; margin-top: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); overflow: hidden; } .msk-demo[hidden], .md-body[hidden] { display: none; } .md-row { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 9px 16px 9px 12px; cursor: pointer; } .md-row:hover { background: var(--pill-hover); } diff --git a/internal/gui/tests/masking-demo.test.cjs b/internal/gui/tests/masking-demo.test.cjs index 5ea82a9e7..a3d5661c0 100644 --- a/internal/gui/tests/masking-demo.test.cjs +++ b/internal/gui/tests/masking-demo.test.cjs @@ -88,6 +88,11 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", assert(await page.locator("#mdBody").isHidden(), "folded at first"); // it sits between the card and the requests assert.deepEqual(await page.evaluate(() => [document.querySelector("#maskDemo").previousElementSibling?.id, document.querySelector("#maskDemo").nextElementSibling?.id]), ["maskCard", "maskList"]); + // with the same room above it as the list has below it + assert.deepEqual(await page.evaluate(() => { + const r = (s) => document.querySelector(s).getBoundingClientRect(); + return [Math.round(r("#maskDemo").top - r("#maskCard").bottom), Math.round(r("#maskList").top - r("#maskDemo").bottom)]; + }), [14, 14]); await page.waitForTimeout(300); assert(!fetched.some((f) => f.endsWith(".webm")), "a video fetched while folded: " + fetched);