前端去重复:抽屉三段皮肤与浮层关闭钮收进 ui/Overlay(分镜检查器改为复用常量),长文本字段高度收进 TEXTAREA_TALL;UI 规范把星号/说明文字/抽屉三条改成 React 现状并删掉已随旧 CSS 删除的全局兜底,清掉空的 components/layout
parent
e4715cf967
commit
5288f52b86
71
docs/UI规范.md
71
docs/UI规范.md
|
|
@ -65,6 +65,8 @@
|
|||
| `:deep(.aplay){min-width:110px}` | 传 `className`(`cn` 走 tailwind-merge,**后写的赢**)或容器上的任意变体 `[&>*]:min-w-[110px]` | `lib/cn.ts` |
|
||||
| `@media (max-width:1180px)` | 断点变体写在类上:`max-huge:`1440 `max-mid:`1180 `max-mid2:`1100 `max-nav:`900 `max-short:`820 `max-tiny:`640 `max-narrow:`560 | `styles/tokens.css` |
|
||||
| 上面七档都不合适的阈值(只属于某个组件自己的塌陷点) | **允许**任意值变体 `max-[620px]:`,但只许在同一个组件/同一段类名常量里复用;一旦第二个文件也要用它,就回 `tokens.css` 的 `@theme` 里升格成 `--breakpoint-名字`(现状:命名档 171 处、任意值 21 处,且集中在 `AgentConsole.tsx` 与 `Storyboard.tsx` 两个页面内部) | `styles/tokens.css` · 页面类名常量 |
|
||||
| 抽屉三段皮肤(标题条 / 唯一滚动区 / 吸底动作条),以及**不是模态却要长成抽屉**的侧栏 | `<Drawer actions>`;自拼结构时复用 `DRAWER_HEAD` / `DRAWER_BODY` / `DRAWER_ACTIONS` + `<CloseButton>` | `ui/Overlay.tsx` |
|
||||
| 抽屉里的整宽 textarea(86px 起、可拉长) | 在容器上挂 `TEXTAREA_TALL` | `ui/Controls.tsx` |
|
||||
| 栅格降列 | `<Grid cols min oneAt steps>`——变量驱动,页面不写 `@media` | `ui/Panel.tsx` |
|
||||
|
||||
## 1. 控件栏(工具条 / 筛选条 / 搜索条 / 卡片动作行)
|
||||
|
|
@ -263,40 +265,55 @@
|
|||
② 单独一个短字段不许脱离栅格自己占满一行;
|
||||
③ 列数由容器决定,页面不写 `@media` 改列数(用 `<Grid cols oneAt steps>` 或断点变体 `max-mid:`/`max-nav:`)。
|
||||
|
||||
```html
|
||||
<div class="frow">
|
||||
<label class="fld"><span>模型</span><Select>…</Select></label>
|
||||
<label class="fld"><span>画幅</span><Select>…</Select></label>
|
||||
</div>
|
||||
<label class="field"><span class="lbl">试听文本 <b class="req">*</b></span>
|
||||
<textarea rows="2"></textarea><small class="muted">说明文字</small></label>
|
||||
```tsx
|
||||
<FormRow>
|
||||
<Field label="模型"><Select value={modelId} onChange={setModelId} options={models} /></Field>
|
||||
<Field label="画幅"><Select value={ratio} onChange={setRatio} options={ratios} /></Field>
|
||||
</FormRow>
|
||||
<FieldBlock label="试听文本" required>
|
||||
<textarea rows={2} value={text} onChange={(e) => setText(e.target.value)} />
|
||||
</FieldBlock>
|
||||
{/* 说明文字走 hint(<Field hint>)或 <LineHint>,别自己拼 small + class */}
|
||||
```
|
||||
|
||||
- **必填星号**:`.req` 必须和标签文字在**同一个** `.lbl` 里(列方向 `label` 的文本节点与
|
||||
`<b>` 会被拆成两个 flex item,星号会掉到下一行——图4 的根因)。
|
||||
未迁移的写法由全局 `label:has(> .req)` 兜底(转块级 + `nowrap`),但新代码一律 `.lbl`。
|
||||
- 说明文字用 `.muted`/`.hintline`,**不超过一行**;超出的解释进手册(`/help` → `frontend/src/pages/Help.tsx`)或 `title` 提示。
|
||||
- 抽屉:标题块与第一个字段之间 ≥ 12px(`.drawer-body > :first-child{margin-top:0}` 由
|
||||
`.drawer-body` 的 padding 提供,不要在页面上加 `margin-top`);标题与紧随其后的分组标题
|
||||
不得共用一行(图4「AI 试听」与「模型」挤在一起)。
|
||||
- **抽屉只有三段式**:外壳 `display:flex;flex-direction:column` → `.drawer-head`(`flex:none`)
|
||||
+ `.drawer-body`(`flex:1;overflow-y:auto`,唯一滚动区)+ `.drawer-actions`(`flex:none`,吸底动作条)。
|
||||
长表单的保存/放弃**必须**走 `<Drawer actions={…}>`(它是外壳的直接子元素),按当前页签条件切换内容;
|
||||
不要在 `.drawer-body` 里塞 `position:sticky;bottom:0` 的假吸底 —— 它抵不掉 body 的 24px 下 padding
|
||||
(滚到底留一条死区),中途还会停在半屏把后面的控件压在身下(第十八章 18.2)。
|
||||
- **逐句行内 textarea 例外**:台词 / 字幕这类「一列多行」的行内文本框用 `min-height:56px`
|
||||
(两行),比 `.drawer-body textarea` 的 86px 矮一档 —— 一镜常有三四句,86px × 3 会把
|
||||
「本镜文案」顶出首屏。只允许在**行内多列栅格**(`.linedlg-row`)里这么降,整宽字段仍走 86px。
|
||||
- 栅格:`grid2/grid3/grid4` 只用于**等宽内容卡**;字段排布一律 `.frow`,
|
||||
- **必填星号**:星号必须和标签文字在**同一个 flex item** 里(列方向的 `label` 会把文本节点
|
||||
与 `<b>` 拆成两个 flex item,星号掉到下一行——图4 的根因)。React 里只有一条路:
|
||||
`<FieldBlock label="试听文本" required>`,星号由 `<Req>` 渲染在同一行内。
|
||||
旧站那条全局兜底 `label:has(> .req)` 已经随旧 CSS 一起删掉了,**写错没人兜**。
|
||||
- 说明文字走 `<Field hint="…">`(贴在字段下面)或 `<LineHint>`(成行告警),
|
||||
配色 `text-muted` / `text-faint`,**不超过一行**;超出的解释进手册(`/help` → `frontend/src/pages/Help.tsx`)或 `title` 提示。
|
||||
- 抽屉:标题块与第一个字段之间 ≥ 12px,由 `<Drawer>` 滚动区自己的 padding(`20px 24px 24px`)提供,
|
||||
不要在内容第一块上补 `margin-top`;标题与紧随其后的分组标题不得共用一行
|
||||
(图4「AI 试听」与「模型」挤在一起)。
|
||||
- **抽屉只有三段式**:外壳 flex column → 标题条(`flex:none`)+ 唯一滚动区(`flex:1;overflow-y:auto`)
|
||||
+ 吸底动作条(`flex:none`)。长表单的保存/放弃**必须**走 `<Drawer actions={…}>`(它就是外壳最后一个
|
||||
直接子元素),按当前页签条件切换内容;不要在滚动区里塞 `position:sticky;bottom:0` 的假吸底 ——
|
||||
它抵不掉滚动区的 24px 下 padding(滚到底留一条死区),中途还会停在半屏把后面的控件压在身下(第十八章 18.2)。
|
||||
- **三段类名只有一份**:`DRAWER_HEAD` / `DRAWER_BODY` / `DRAWER_ACTIONS` + 右上角 `<CloseButton>`,
|
||||
都在 `components/ui/Overlay.tsx`。分镜「检查器」是这套皮肤的第二个用户:它**不能**做成 `<Drawer>`
|
||||
(Drawer 是模态——遮罩会吞掉左边看板的点击、Esc 一按就关,而改分镜要左右来回看),
|
||||
结构自己拼(中间多一条页签栏),但三段尺子和 ✕ 必须复用常量。
|
||||
以后要加「非模态侧栏」也一样:借常量,不抄类名。
|
||||
- **长文本字段高度**:抽屉里的整宽 textarea 统一 86px 起、允许手工拉长,
|
||||
写法是在**容器**上挂 `TEXTAREA_TALL`(`components/ui/Controls.tsx`),不要逐个 textarea 再抄一遍
|
||||
`min-h / resize-y / leading`(此前资产库与资产管理各抄一份,leading 已经写歪)。
|
||||
- **逐句行内 textarea 例外**:台词 / 字幕这类「一列多行」的行内文本框给两行高(`rows={2}` ≈ 56px),
|
||||
比 `TEXTAREA_TALL` 矮一档 —— 一镜常有三四句,86px × 3 会把「本镜文案」顶出首屏。
|
||||
只允许在**行内多列栅格**里这么降,整宽字段仍走 86px。
|
||||
- 栅格:`grid2/grid3/grid4`(`<Grid>`)只用于**等宽内容卡**;字段排布一律 `<FormRow>`,
|
||||
响应式由 `auto-fit` 自己降列,页面别写 `@media` 改列数。
|
||||
|
||||
探针:`REQ-WRAP`(星号与标签文字 `top` 不同)、`HEAD-CROWD`(标题/分组标题与首控件垂直间距 < 8px)、
|
||||
`STACK-WIDE`(`.field` 之外出现的整宽单选/下拉)、`ROW-STACK`(`.ctlbar` 里出现 ≥ 容器 80% 宽的控件)。
|
||||
前两条量的是坐标与 `getComputedStyle`,React 化之后照用;后两条靠旧类名认容器,会**漏报而不是误报**,
|
||||
细节见 §8 第 5 条。
|
||||
|
||||
静态扫描 `/tmp/nexshot/scan16.py` 另外保证:模板里 **0 个裸 `<label>`(无 class 直接跟控件)**、
|
||||
0 个原生 `<select>`、0 个写在控件上的 `style="--ctl-h…"`;`scan_fields.py` / `scan_short.py`
|
||||
是它的两条细分规则。剩余的内联 `style="margin-*"` 只允许出现在**内容块**(面板/卡片/日志区)上,
|
||||
不允许出现在 `.ctlbar/.frow/.chipbar/.field` 这几类规范容器上。
|
||||
旧站的三条静态扫描(`scan16.py` / `scan_fields.py` / `scan_short.py`:模板里的裸 `<label>`、
|
||||
原生 `<select>`、控件上内联的 `style="--ctl-h…"`)在 React 里已经变成**编译期约束**——字段只能从
|
||||
`Field` / `FieldBlock` 出来,下拉只有 `<Select>` / `<MultiSelect>`,`--ctl-h` 由容器声明,
|
||||
`npx tsc --noEmit` + `npm run build` 就是新的门禁,不再单独跑那三个脚本。
|
||||
剩余的内联 `style="margin-*"` 只允许出现在**内容块**(面板/卡片/日志区)上,
|
||||
不允许出现在规范容器(`Ctlbar` / `FormRow` / `ChipBar` / `FieldBlock`)上。
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -171,6 +171,14 @@ export function TagChip({ children, onRemove, className, removeTitle }: {
|
|||
* 档位默认覆盖表格页的常用宽度;卡片墙这类一格 150px 的网格要的是 24/60/120/全部,
|
||||
* 所以档位开成入参,由页面自己给(sizes 里 0 表示不分页)。
|
||||
*/
|
||||
/**
|
||||
* 长文本字段的统一高度(UI规范 §3):抽屉里的提示词 / 描述至少要 86px 才装得下一句完整的话,
|
||||
* 同时允许用户自己继续拉长。
|
||||
* 挂在**容器**上(`[&_textarea]`)而不是每个 textarea 上——往抽屉里加字段的人
|
||||
* 不该再记一遍这三条类名;此前 AssetLibrary 与 Library 各抄了一份,leading 已经写歪。
|
||||
*/
|
||||
export const TEXTAREA_TALL = '[&_textarea]:min-h-[86px] [&_textarea]:resize-y [&_textarea]:leading-[1.65]'
|
||||
|
||||
const DEFAULT_SIZES = [12, 20, 24, 30, 48, 60, 120]
|
||||
export function Pager({ page, pages, total, pageSize, onPageSize, onPage, extra, sizes = DEFAULT_SIZES }: {
|
||||
page: number; pages: number; total?: number; pageSize?: number
|
||||
|
|
|
|||
|
|
@ -37,6 +37,35 @@ function useScrollLock(open: boolean) {
|
|||
}, [open])
|
||||
}
|
||||
|
||||
/* ── 抽屉三段式的皮肤(UI规范 §3)────────────────────────────────────────
|
||||
<Drawer> 一处用它们时,类名写死在 JSX 里就够了;分镜「检查器」是第二处:
|
||||
它刻意不做成 Drawer(Drawer 是模态——遮罩会吞掉左边看板的点击、Esc 一按就关,
|
||||
而改分镜要在看板和字段之间来回看),外观却又必须和抽屉一模一样。
|
||||
皮肤抄第二遍,下次调 padding 只会改到一处,另一处慢慢就长歪。
|
||||
所以三段类名提到这里,页面写成 <header className={DRAWER_HEAD}>,
|
||||
结构各留各的(检查器有自己的页签条和逐镜导航),视觉只有一个来源。 */
|
||||
export const DRAWER_HEAD = 'flex-none flex justify-between items-start gap-[14px] p-[20px_24px_15px] '
|
||||
+ 'max-short:p-[20px_14px_15px] border-b border-[--c-bg-emphasis] '
|
||||
+ 'bg-[linear-gradient(120deg,var(--c-bg-raised),var(--c-bg-panel)_55%)]'
|
||||
/** 唯一滚动区:只有 body 滚,标题条与动作条不动 */
|
||||
export const DRAWER_BODY = 'flex-1 min-w-0 overflow-y-auto scrollbar-slim p-[20px_24px_24px] '
|
||||
+ 'max-short:p-[20px_14px_14px] [scrollbar-gutter:stable]'
|
||||
/** 吸底动作条。flex-wrap 不能省:窄屏下按钮挤成一排是溢出,不是折行 */
|
||||
export const DRAWER_ACTIONS = 'flex-none flex flex-wrap items-center gap-2 p-[14px_24px] max-short:p-[14px] '
|
||||
+ 'border-t border-line bg-raised [--ctl-h:var(--ctl-h-md)]'
|
||||
|
||||
/**
|
||||
* 浮层右上角的 ✕。抽屉、模态、分镜检查器各抄过一份,
|
||||
* 其中模态那份就漏了 hover 描边——同一个动作长三种样子,这里收成一个。
|
||||
* 提示统一带「(Esc)」:浮层一律 Esc 可关(见 useOverlay),别让人去猜。
|
||||
*/
|
||||
export function CloseButton({ onClose, label = '关闭' }: { onClose: () => void; label?: string }) {
|
||||
return (
|
||||
<button type="button" aria-label={label} title={`${label}(Esc)`} onClick={onClose}
|
||||
className="flex-none grid place-items-center w-(--ctl-h-md) h-(--ctl-h-md) border border-line-strong rounded-tile bg-card text-ink-2 text-ui hover:border-[--c-accent-deep] hover:text-accent-bright hover:bg-accent-tint">✕</button>
|
||||
)
|
||||
}
|
||||
|
||||
export function Drawer({ open, onClose, eyebrow, title, sub, children, actions, width, closeOnBackdrop = true, label }: {
|
||||
open: boolean
|
||||
onClose: () => void
|
||||
|
|
@ -62,20 +91,19 @@ export function Drawer({ open, onClose, eyebrow, title, sub, children, actions,
|
|||
<section role="dialog" aria-modal="true" aria-label={typeof label === 'string' ? label : undefined}
|
||||
className={cn('flex flex-col min-w-0 h-screen border-l border-line-strong bg-shell shadow-drawer',
|
||||
width || 'w-[min(1360px,calc(100vw-20px))] max-huge:w-[calc(100vw-16px)] max-short:w-screen')}>
|
||||
<header className="flex-none flex justify-between items-start gap-[14px] p-[20px_24px_15px] max-short:p-[20px_14px_15px] border-b border-[--c-bg-emphasis] bg-[linear-gradient(120deg,var(--c-bg-raised),var(--c-bg-panel)_55%)]">
|
||||
<header className={DRAWER_HEAD}>
|
||||
<div className="min-w-0">
|
||||
{eyebrow && <small className="text-tiny tracking-[1.6px] text-muted font-bold">{eyebrow}</small>}
|
||||
<h2 className="text-lg font-bold mt-[5px] mb-0">{title}</h2>
|
||||
{sub && <p className="mt-[5px] mb-0 text-tiny text-dim leading-[1.6]">{sub}</p>}
|
||||
</div>
|
||||
<button type="button" aria-label="关闭" onClick={onClose}
|
||||
className="flex-none grid place-items-center w-(--ctl-h-md) h-(--ctl-h-md) border border-line-strong rounded-tile bg-card text-ink-2 text-ui hover:border-[--c-accent-deep] hover:text-accent-bright hover:bg-accent-tint">✕</button>
|
||||
<CloseButton onClose={onClose} />
|
||||
</header>
|
||||
<div className="flex-1 min-w-0 overflow-y-auto scrollbar-slim p-[20px_24px_24px] max-short:p-[20px_14px_14px] [scrollbar-gutter:stable]">
|
||||
<div className={DRAWER_BODY}>
|
||||
{children}
|
||||
</div>
|
||||
{actions && (
|
||||
<footer className="flex-none flex items-center gap-2 p-[14px_24px] max-short:p-[14px] border-t border-line bg-raised [--ctl-h:var(--ctl-h-md)]">
|
||||
<footer className={DRAWER_ACTIONS}>
|
||||
{actions}
|
||||
</footer>
|
||||
)}
|
||||
|
|
@ -112,8 +140,7 @@ export function Modal({ open, onClose, eyebrow, title, children, footer, width =
|
|||
{eyebrow && <small className="block text-tiny tracking-[1.6px] text-muted font-bold">{eyebrow}</small>}
|
||||
<h2 className="text-md font-bold m-0">{title}</h2>
|
||||
</div>
|
||||
<button type="button" aria-label="关闭" onClick={onClose}
|
||||
className="flex-none grid place-items-center w-(--ctl-h-md) h-(--ctl-h-md) border border-line-strong rounded-tile bg-card text-ink-2 text-ui hover:text-accent-bright hover:bg-accent-tint">✕</button>
|
||||
<CloseButton onClose={onClose} />
|
||||
</header>
|
||||
)}
|
||||
<div className="flex-1 min-w-0 overflow-y-auto scrollbar-slim p-[18px] [scrollbar-gutter:stable]">{children}</div>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ import { useRecordingBusy } from '../stores/recording'
|
|||
import {
|
||||
BarRight, Between, Button, Chip, ChipBar, Check, Ctlbar, Drawer, Empty, ErrorText, Field, FieldBlock,
|
||||
FilePick, FormRow, Grid, LINK_CLS, Modal, MONO, MUTED, MUTED_MONO, Notice, PageHead, Pager, Panel, PanelHead,
|
||||
Row, SectionTitle, Spinner, Tag, ViewBtn
|
||||
Row, SectionTitle, Spinner, Tag, TEXTAREA_TALL, ViewBtn
|
||||
} from '../components/ui'
|
||||
|
||||
type AssetType = 'human' | 'scene' | 'voice'
|
||||
|
|
@ -1464,7 +1464,7 @@ export default function AssetLibrary() {
|
|||
<Button variant="outline" onClick={() => setDrawer(false)}>取消</Button>
|
||||
</>}>
|
||||
{/* 长文本字段要有可写的面积,还要允许用户自己继续拉高(旧站 .drawer-body textarea) */}
|
||||
<div className="[&_textarea]:min-h-[86px] [&_textarea]:resize-y [&_textarea]:leading-[1.65]">
|
||||
<div className={TEXTAREA_TALL}>
|
||||
<FormRow>
|
||||
<Field label="名称" required>
|
||||
<input value={form.name} placeholder="角色 / 场景 / 声线名称"
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import {
|
|||
Actions, BarRight, Between, buttonCls, Button, CARD_ROW, Check, Chip, ChipBar, Ctlbar, Divider, Drawer,
|
||||
Empty, ErrorText, Field, FieldBlock, FilePick, FormRow, LineHint, LINK_CLS, MONO, MUTED, MUTED_MONO, Panel,
|
||||
PanelHead,
|
||||
Row, SectionTitle, Spinner, TabStack, Table, TableBox, Tag, cellRight, cellWrap
|
||||
Row, SectionTitle, Spinner, TabStack, Table, TableBox, Tag, TEXTAREA_TALL, cellRight, cellWrap
|
||||
} from '../../components/ui'
|
||||
import { useSystemStore } from '../../stores/system'
|
||||
import { refresh, useProjectStore } from '../../stores/project'
|
||||
|
|
@ -1215,7 +1215,7 @@ export default function Library() {
|
|||
<Button variant="outline" onClick={closeGen}>取消</Button>
|
||||
</>}>
|
||||
{/* 正文走纵向 12px 节奏;提示词都是长句,textarea 给足高度并允许手工拉长 */}
|
||||
<div className="flex flex-col gap-3 [&_textarea]:min-h-[86px] [&_textarea]:resize-y [&_textarea]:leading-[1.65]">
|
||||
<div className={cn('flex flex-col gap-3', TEXTAREA_TALL)}>
|
||||
{genType === 'voice' ? (
|
||||
<>
|
||||
<FormRow className="mb-0">
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ import {
|
|||
Actions, BarRight, Between, Button, CARD_ROW, Check, Chip, ChipBar, Ctlbar, Divider, Empty, ErrorText,
|
||||
ExtLink, Field, FieldBlock, FilePick, FormRow, LINK_CLS, Loading, Mono, MUTED, MUTED_MONO, Notice,
|
||||
Panel, PanelHead, Row, SectionTitle, Spinner, Status, TabStack, Table, TableBox, Tabs, Tag, ViewBtn,
|
||||
buttonCls, cellCenter, cellRight, cellWrap
|
||||
buttonCls, cellCenter, cellRight, cellWrap, CloseButton, DRAWER_ACTIONS, DRAWER_BODY,
|
||||
DRAWER_HEAD
|
||||
} from '../../components/ui'
|
||||
|
||||
type ViewMode = 'grid' | 'table'
|
||||
|
|
@ -1422,7 +1423,7 @@ export default function Storyboard() {
|
|||
+ 'w-[min(max(900px,68vw),1500px)] flex-col overflow-hidden border-l border-line-strong bg-sunken shadow-drawer '
|
||||
+ 'max-[1400px]:w-[min(880px,calc(100vw-24px))] max-[1080px]:w-[min(760px,calc(100vw-24px))] max-[720px]:w-screen'
|
||||
)}>
|
||||
<header className="flex-none flex justify-between items-start gap-[14px] p-[20px_24px_15px] max-short:p-[20px_14px_15px] border-b border-[--c-bg-emphasis] bg-[linear-gradient(120deg,var(--c-bg-raised),var(--c-bg-panel)_55%)]">
|
||||
<header className={DRAWER_HEAD}>
|
||||
<div className="min-w-0">
|
||||
<small className="text-tiny tracking-[1.6px] text-muted font-bold">
|
||||
{creating ? 'NEW SHOT' : `${current?.code || 'SHOT'} · 第 ${shotPos} / ${filtered.length} 镜`}
|
||||
|
|
@ -1437,9 +1438,7 @@ export default function Storyboard() {
|
|||
title="上一镜(K / ↑)" onClick={() => void goShot(-1)}>↑ 上一镜</Button>
|
||||
<Button variant="outline" size="sm" disabled={!canStep(1)}
|
||||
title="下一镜(J / ↓)" onClick={() => void goShot(1)}>下一镜 ↓</Button>
|
||||
<button type="button" aria-label="关闭分镜详情" title="关闭(Esc)"
|
||||
onClick={() => void closeInspector()}
|
||||
className="grid h-(--ctl-h-md) w-(--ctl-h-md) place-items-center rounded-tile border border-line-strong bg-card text-ui text-ink-2 hover:border-[--c-accent-deep] hover:bg-accent-tint hover:text-accent-bright">✕</button>
|
||||
<CloseButton label="关闭分镜详情" onClose={() => { void closeInspector() }} />
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
|
@ -1453,9 +1452,9 @@ export default function Storyboard() {
|
|||
]} />
|
||||
</div>
|
||||
|
||||
<div className="flex-1 min-w-0 overflow-y-auto scrollbar-slim p-[20px_24px_24px] max-short:p-[20px_14px_14px] [scrollbar-gutter:stable]">
|
||||
<div className={DRAWER_BODY}>
|
||||
{/* 四个页签全部保持挂载、只用 hidden 收起:
|
||||
「✎ 改文案」要 querySelector 到画面描述 textarea,
|
||||
「✎ 改文案」要拿到画面描述的 textarea(descRef),
|
||||
卸载式页签切过去才渲染,那个动作就会静默失败。 */}
|
||||
<Panel className={cn('bg-shell', inspectorTab !== 'shot' && 'hidden')}>
|
||||
<SectionTitle title="只改这一镜:保存后提示词与预检即时重算,不必重跑整份分镜">📝 本镜文案</SectionTitle>
|
||||
|
|
@ -1838,7 +1837,7 @@ export default function Storyboard() {
|
|||
{/* 保存条:抽屉级吸底(不是 body 内 sticky)——长表单滚到哪儿都能存,
|
||||
也不会出现「sticky 停在半屏、把后面的控件压在身下」的错位。 */}
|
||||
{inspectorTab === 'shot' ? (
|
||||
<div className="flex-none flex flex-wrap items-center gap-2 border-t border-line bg-raised p-[14px_24px] max-short:p-[14px] [--ctl-h:var(--ctl-h-md)]">
|
||||
<div className={DRAWER_ACTIONS}>
|
||||
<Button variant="primary" disabled={!!busy} onClick={() => void saveShot()}
|
||||
title={creating ? '创建这一镜' : '保存这一镜(⌘S)'}>
|
||||
{creating ? '创建镜头' : '保存镜头'}
|
||||
|
|
|
|||
Loading…
Reference in New Issue