系列有语义描边 + 语义底纹 + 圆角 + 内边距档位,
+ * 而 Alert 是 antd 自带的那套(浅色档还带着它自己的 closable 图标位置),
+ * 并且它**没有 action 位**:App.tsx 那条「后端连接异常」要挂「重试」按钮,
+ * 只能绕过 kit 直接 import antd 的 Alert。
+ * 做法:读 R16.3 那把唯一的尺子 `BLOCK_TONE`(语义底纹 + 语义描边),
+ * 左侧色块用色块族(20px 档,与概况抽屉的七站行同一尺寸),
+ * 两行文案 = `children`(一句人话)+ `description`(明细 / 善后),
+ * 右侧新增 `action` 位(重试、去设置这种善后按钮),`onClose` 走标准图标按钮。
+ * props 与原来完全一致(含 antd 词汇的 `type`),30 处调用点零改动。
+ * 为什么保留 antd 的 type 词汇:`type="success" | "error"` 这套名字已经写在 30 处调用点里,
+ * 它是**语义**而不是皮肤;`NOTICE_TONE` 把它翻成站内语气,皮肤换多少轮都不用碰页面。
*/
-export function Notice({ children, description, danger, className, onClose, type }: {
+export function Notice({ children, description, danger, className, onClose, type, action }: {
children: ReactNode; danger?: boolean; className?: string; onClose?: () => void
/**
* 第二层说明(与 antd Alert 同名):`children` 是「一句人话」的标题,
- * 多条明细 / 善后按钮属于正文,塞进 children 会让 Alert 只有一层粗体、
+ * 多条明细 / 善后按钮属于正文,塞进 children 会让整块只有一层粗体、
* 明细和按钮跟着一起加粗,于是页面又自己写 + 造第二层。
*/
description?: ReactNode
/** Alert 的四档语义;`danger` 是站内先写下的 error 简写,两者等价 */
type?: 'info' | 'success' | 'warning' | 'error'
+ /** 右侧善后动作(重试 / 去设置);一颗 Button 或一组按钮,不放正文 */
+ action?: ReactNode
}) {
if (!children) return null
+ const tone = NOTICE_TONE[type ?? (danger ? 'error' : 'info')]
return (
-
+
+ {TONE_ICON[tone]}
+
+
{children}
+ {description &&
{description}
}
+
+ {action && {action}
}
+ {onClose && } onClick={onClose} />}
+
)
}
diff --git a/frontend/src/components/ui/Toast.tsx b/frontend/src/components/ui/Toast.tsx
new file mode 100644
index 0000000..146fbba
--- /dev/null
+++ b/frontend/src/components/ui/Toast.tsx
@@ -0,0 +1,100 @@
+/**
+ * 吐司(操作完成后的即时反馈):自绘表面,**不用 antd ``**(2026-11 第十三轮)。
+ *
+ * 症状(用户原话「整体修改系统中所有提示窗、完成后的反馈 tips 等。不要使用默认组件」):
+ * antd `` 是页面顶部正中一颗纯黑药丸,只有「图形 + 一行白字」:
+ * 长报错读不完、悬停不暂停、重复推送叠成一串一模一样的胶囊,
+ * 而且它是全站唯一没有描边 / 没有色块 / 没有底纹的块,看着像浏览器自己的提示。
+ * 做法:右下角堆叠卡片,皮肤与站内其它信息块同族(`.nex-mark` 色块族 + antd 语义 token):
+ * ① 第一行 = 语义色块图标 + 一句结论(+ 重复次数 ×N),第二行 = 后果 / 明细;
+ * ② 底部一条倒计时条,鼠标悬停或键盘聚焦时**整条暂停**(读得完为止),移开继续;
+ * ③ 一屏最多 5 颗,新的从下面进、把旧的往上顶;关闭只有关闭键一条路(不吞点击);
+ * ④ 队列在 `stores/notice.ts`,`notify()` / `notifyBad()` 的签名不变,63 处调用点零改动。
+ * 为什么右下角而不是顶部居中:顶部正中压住的正是门牌与主操作(用户上一轮刚要求
+ * 「右侧的主功能入口要对齐」),反馈不该把刚点的那颗按钮盖掉;
+ * 右下角在视口边缘,不与会话里的任何一块正文争位置。
+ * 为什么自己维护倒计时而不是 CSS `animation-delay` 一挂了事:暂停 / 恢复要同时作用在
+ * 「进度条」和「真的关闭」两件事上,两者必须同源,否则条停了、卡片却消失了。
+ */
+import { useEffect, useRef, useState } from 'react'
+import { cn } from '../../lib/cn'
+import { useNoticeStore, type ToastItem } from '../../stores/notice'
+import { TONE_ICON, TONE_LABEL, TONE_TINT } from './tone'
+import { Button } from './Button'
+import { IconChevronRight, IconClose } from '../icons'
+
+/** 挂在 app/providers.tsx 上(唯一一处),登录页与工作台共用同一条队列 */
+export function ToastHost() {
+ const items = useNoticeStore((s) => s.items)
+ const dismiss = useNoticeStore((s) => s.dismiss)
+ return (
+ /* 容器常驻 + aria-live:朗读器要先「在场」才会念出后来插入的那颗 */
+
+ {items.map((t) => dismiss(t.id)} />)}
+
+ )
+}
+
+function ToastCard({ item, onClose }: { item: ToastItem; onClose: () => void }) {
+ const [paused, setPaused] = useState(false)
+ const left = useRef(item.duration * 1000)
+ const mark = useRef(performance.now())
+
+ /* 同一条消息被再次推送(去重成 ×N):倒计时拨回满格,让人重新读一遍 */
+ useEffect(() => {
+ left.current = item.duration * 1000
+ mark.current = performance.now()
+ }, [item.stamp, item.duration])
+
+ /* 真的关闭:暂停时把已走的时间结算掉,恢复时从剩余时间继续 */
+ useEffect(() => {
+ if (paused || item.duration <= 0) return
+ const timer = window.setTimeout(onClose, Math.max(0, left.current))
+ return () => {
+ window.clearTimeout(timer)
+ left.current = Math.max(0, left.current - (performance.now() - mark.current))
+ }
+ }, [paused, item.duration, item.stamp, onClose])
+
+ /* 暂停 / 恢复的那一刻重设基准点(必须排在上面那条 effect 之后声明) */
+ useEffect(() => { mark.current = performance.now() }, [paused])
+
+ const permanent = item.duration <= 0
+ return (
+ setPaused(true)} onMouseLeave={() => setPaused(false)}
+ onFocus={() => setPaused(true)} onBlur={() => setPaused(false)}>
+
+ {TONE_ICON[item.tone]}
+
+
+
+
+ {item.title}
+ {item.count > 1 && ×{item.count}}
+
+ {item.desc &&
{item.desc}
}
+ {item.action && (
+
} iconPosition="end"
+ onClick={() => { item.action!.onClick(); onClose() }}>
+ {item.action.label}
+
+ )}
+
+
+
} onClick={onClose} />
+
+ {/* 倒计时条:宽度 = 剩余时间,悬停暂停与 JS 同源(.is-paused 把动画按停) */}
+ {!permanent && (
+
+ )}
+
+ )
+}
+
+export default ToastHost
diff --git a/frontend/src/components/ui/index.ts b/frontend/src/components/ui/index.ts
index 6f5b35c..5dc7ae8 100644
--- a/frontend/src/components/ui/index.ts
+++ b/frontend/src/components/ui/index.ts
@@ -15,3 +15,7 @@ export * from './IconText'
export * from './Tile'
export * from './Slider'
export * from './grid'
+/* 反馈四级表面(R19):语义表 → 提示条(Panel 里的 Notice)→ 吐司 → 确认框 */
+export * from './tone'
+export * from './Toast'
+export * from './Confirm'
diff --git a/frontend/src/components/ui/tone.tsx b/frontend/src/components/ui/tone.tsx
new file mode 100644
index 0000000..18f99a2
--- /dev/null
+++ b/frontend/src/components/ui/tone.tsx
@@ -0,0 +1,48 @@
+/**
+ * 反馈色调:吐司 / 确认框 / 提示条共用的**唯一一张**语义表(2026-11 第十三轮)。
+ *
+ * 症状:反馈类表面原先各说各话——antd `` 只有「绿勾小胶囊 / 红叉小胶囊」,
+ * `window.confirm` 连颜色都没有(浏览器原生灰框,字体、按钮、层级全是系统的),
+ * `Notice` 是 antd Alert 的直封装(四档 type 自带一套图标)。
+ * 同一个「删除失败」在一屏里可能出现三种长相。
+ * 做法:把「一个反馈语气该是什么颜色、什么图形」抽成一张表,三个表面都读它:
+ * 色调变量只取 antd 语义 token(`--ant-color-*`,站内唯一色源),
+ * 图形只取 `components/icons` 登记的语义名(R11)。
+ * 底纹与描边不在这里:那套口径由 `Panel.tsx` 的 `BLOCK_TONE` 管(R16.3)。
+ * 为什么不复用 Status.tsx 的 TONE_VARS:那张表服务的是**行内标签**(一颗 6px 圆点),
+ * 语气档位多了 accent / mono 却没有 loading;反馈表面要的是「一句结论 + 一枚图形」,
+ * 尺寸与图形 vocabulary 都不同,硬合成一张表会让两边都不敢改。
+ */
+import type { ReactNode } from 'react'
+import { IconCheck, IconInfo, IconLoading, IconReject, IconWarn } from '../icons'
+
+/** 反馈语气:成功 / 失败 / 需要注意 / 纯信息 / 进行中 */
+export type FeedbackTone = 'ok' | 'bad' | 'warn' | 'info' | 'loading'
+
+/** 色调 → antd 语义色变量(写进 CSS 变量 `--nex-mark-tint`,由 app.css 的色块族上色) */
+export const TONE_TINT: Record = {
+ ok: 'var(--ant-color-success)',
+ bad: 'var(--ant-color-error)',
+ warn: 'var(--ant-color-warning)',
+ info: 'var(--ant-color-info)',
+ loading: 'var(--ant-color-primary)'
+}
+
+/** 色调 → 色块里的那枚图形 */
+export const TONE_ICON: Record = {
+ ok: ,
+ bad: ,
+ warn: ,
+ info: ,
+ loading:
+}
+
+/** 语气名(aria-label / title 共用,不再逐处手写中文) */
+export const TONE_LABEL: Record = {
+ ok: '成功', bad: '失败', warn: '注意', info: '提示', loading: '进行中'
+}
+
+/** 提示条的 antd Alert 词汇 → 站内语气(30 处 `` 的写法保持不变) */
+export const NOTICE_TONE: Record<'info' | 'success' | 'warning' | 'error', FeedbackTone> = {
+ info: 'info', success: 'ok', warning: 'warn', error: 'bad'
+}
diff --git a/frontend/src/pages/AssetLibrary.tsx b/frontend/src/pages/AssetLibrary.tsx
index ff3de92..88ac259 100644
--- a/frontend/src/pages/AssetLibrary.tsx
+++ b/frontend/src/pages/AssetLibrary.tsx
@@ -41,6 +41,7 @@ import { MediaPick, MediaRemove, MediaThumb, type MediaRadius } from '../compone
import { RecordAudio, type RecordPickMeta } from '../components/media/RecordAudio'
import { useAutoRefresh } from '../hooks'
import { useRecordingBusy } from '../stores/recording'
+import { confirmAction } from '../stores/confirm'
import { ActionGroup, BarRight, Between, Block, Button, CardActions, Check, Checkbox, Chip, ChipBar, Ctlbar, Drawer, Empty, ErrorText, Field, FieldBlock, FilePick, FormGrid, FormRow, Grid, Input, LINK_CLS, MONO, MUTED, MUTED_MONO, Modal, Notice, NumberInput, PageHead, Pager, Panel, PanelHead, Row, SearchInput, SectionTitle, Spinner, Stat, StatGrid, Tabs, Tag, TagGroup, TextArea, Tile, Value, ViewSwitch } from '../components/ui'
import { IconAdd, IconBlocks, IconBolt, IconCheck, IconUpload, IconClose, IconDelete, IconEdit, IconGrid, IconImage, IconLibrary, IconList, IconRobot, IconSound, IconTag, IconUser, IconVoice } from '../components/icons'
@@ -668,7 +669,12 @@ export default function AssetLibrary() {
}
async function deleteMedia(media: any) {
- if (!window.confirm(`确认删除「${media.name || media.kind_label}」这个媒体文件?`)) return
+ const ok = await confirmAction({
+ title: `删除「${media.name || media.kind_label}」这个媒体文件?`,
+ desc: '文件本身与库里的记录一并删除,引用它的素材位置会变成缺失,需要重新指定。',
+ tone: 'danger', confirmText: '删除', confirmIcon:
+ })
+ if (!ok) return
const wasWall = view === 'media'
setBusy('删除媒体文件')
setError('')
diff --git a/frontend/src/pages/Dashboard.tsx b/frontend/src/pages/Dashboard.tsx
index 3ea9e84..732b388 100644
--- a/frontend/src/pages/Dashboard.tsx
+++ b/frontend/src/pages/Dashboard.tsx
@@ -27,6 +27,7 @@ import {
} from '../stores/models'
import { useSystemStore } from '../stores/system'
import { notify } from '../stores/notice'
+import { confirmAction } from '../stores/confirm'
import { IconAdd, IconChart, IconCheck, IconChevronUp, IconClose, IconDelete, IconFolder, IconImage, IconPlay, IconPlayCircle, IconProjects, IconReload, IconSound } from '../components/icons'
/** 新建项目表单:字段名与后端 POST /api/projects 一致,提交时直接展开 */
type NewProjectForm = {
@@ -303,7 +304,13 @@ export default function Dashboard() {
}
async function removeProject(p: any) {
- if (!window.confirm(`确认删除项目《${p.name}》?该操作不可恢复。`)) return
+ const ok = await confirmAction({
+ /* 项目名本身就常带《》,这里不再套第二层书名号 */
+ title: `删除项目「${p.name}」?`,
+ desc: '项目内的镜头、时间线与版本记录一并删除,磁盘上的产物文件同时清掉,不可恢复。',
+ tone: 'danger', confirmText: '删除', confirmIcon:
+ })
+ if (!ok) return
try {
await api.del(`/api/projects/${p.id}`, { purge_files: true })
await load()
@@ -486,11 +493,15 @@ export default function Dashboard() {
{ title: '镜头', key: 'shots', width: 112, align: 'right', className: NOWRAP, render: (_: any, p: any) => (
<>{p.stats?.shots || 0} / 合格 {p.stats?.shots_approved || 0}>
) },
+ /* 进度一格 = 上下两条:上面一条整宽的条,下面一条百分数。
+ 以前两者是同一个 nowrap 单元格里的兄弟行内盒:条占满 100% 之后
+ 百分数放不下,整条线被 text-align:right 往左推,数字越出内容盒
+ 右缘最多 32px(tableaudit 的「格子内容越界」判据就是为它加的)。 */
{ title: '进度', key: 'progress', width: 118, align: 'right', className: NOWRAP, render: (_: any, p: any) => (
- <>
-
- {pct(p.stats?.progress_ratio)}
- >
+
+
+
{pct(p.stats?.progress_ratio)}
+
) },
{ title: '时长', key: 'duration', width: 78, align: 'right', className: `${NOWRAP} ${MONO}`,
render: (_: any, p: any) => `${(p.stats?.planned_duration || 0).toFixed(0)}s` },
diff --git a/frontend/src/pages/ModelCenter.tsx b/frontend/src/pages/ModelCenter.tsx
index 654704b..eb43a77 100644
--- a/frontend/src/pages/ModelCenter.tsx
+++ b/frontend/src/pages/ModelCenter.tsx
@@ -20,6 +20,7 @@ import { cn } from '../lib/cn'
import { EyeIcon, SecretInput, Select } from '../components/forms'
import { Between, Block, Button, CardActions, Check, Chip, ChipBar, Ctlbar, Dense, Drawer, Empty, Field, FieldBlock, FormGrid, FormRow, Grid, IconText, Input, Layout, LinkButton, MONO, MUTED, Notice, NumberInput, PageHead, Panel, PanelHead, Row, SearchInput, SectionTitle, Slider, Spinner, Stat, StatGrid, Tabs, Tag, TagGroup, TextArea, Tile, Value } from '../components/ui'
import { useAuthStore } from '../stores/auth'
+import { confirmAction } from '../stores/confirm'
import { useProjectStore } from '../stores/project'
import { IconAdd, IconBolt, IconChart, IconCheck, IconChevronUp, IconClose, IconDelete, IconGrid, IconImage, IconNodeIndex, IconParams, IconPlayCircle, IconReload, IconVoice, IconWarn } from '../components/icons'
/** /api/providers 还没回来(或后端挂了这个接口)时左栏仍要能渲染 */
@@ -451,7 +452,12 @@ export default function ModelCenter() {
}
async function remove(row: any) {
- if (!window.confirm(`确认删除模型「${row.display_name || row.model}」?`)) return
+ const ok = await confirmAction({
+ title: `删除模型「${row.display_name || row.model}」?`,
+ desc: '这条配置将从平台移除,之后不能再选它发起任务;已经生成的产物不受影响。',
+ tone: 'danger', confirmText: '删除', confirmIcon:
+ })
+ if (!ok) return
setBusy('删除模型')
try {
await api.del(`/api/providers/${row.id}`)
diff --git a/frontend/src/pages/UserAdmin.tsx b/frontend/src/pages/UserAdmin.tsx
index dc4c576..662c3b8 100644
--- a/frontend/src/pages/UserAdmin.tsx
+++ b/frontend/src/pages/UserAdmin.tsx
@@ -12,6 +12,7 @@ import { useAutoRefresh } from '../hooks'
import { SecretInput, Select } from '../components/forms'
import { ActionGroup, Actions, Badge, Button, Check, Ctlbar, Empty, ErrorText, Field, FieldBlock, FormRow, Heading, Input, Layout, MUTED, MUTED_MONO, Mono, PageHead, PageStack, Panel, PanelHead, SearchInput, Stack, Stat, StatGrid, Sub, Table, Tag, TextArea } from '../components/ui'
import { notify, notifyBad } from '../stores/notice'
+import { confirmAction } from '../stores/confirm'
import { roleLabel, useAuthStore } from '../stores/auth'
import { IconAdd, IconCheck, IconClock, IconKey, IconLogout, IconStop, IconTeam, IconUser } from '../components/icons'
@@ -144,7 +145,12 @@ export default function UserAdmin() {
async function disable() {
if (!selected) return
- if (!window.confirm(`停用「${selected.display_name || selected.username}」?停用后该账号无法登录,历史操作记录仍会保留。`)) return
+ const ok = await confirmAction({
+ title: `停用「${selected.display_name || selected.username}」?`,
+ desc: '停用后该账号无法登录,历史操作记录仍会保留。',
+ tone: 'warn', confirmText: '停用', confirmIcon:
+ })
+ if (!ok) return
setBusy('停用账号'); setError('')
try {
await api.del(`/api/users/${selected.id}`)
@@ -156,7 +162,7 @@ export default function UserAdmin() {
return (
- } />
+
{error}
{/* 统计卡一共 5 项:给 5 列,别让第 5 张孤零零掉到第二行 */}
diff --git a/frontend/src/pages/project/Storyboard.tsx b/frontend/src/pages/project/Storyboard.tsx
index 411f560..1340905 100644
--- a/frontend/src/pages/project/Storyboard.tsx
+++ b/frontend/src/pages/project/Storyboard.tsx
@@ -27,6 +27,7 @@ import {
import { refresh, useProjectStore } from '../../stores/project'
import { options, useSystemStore } from '../../stores/system'
import { notify } from '../../stores/notice'
+import { confirmAction } from '../../stores/confirm'
import { openPreview, usePreviewOpen } from '../../stores/preview'
import { PageHead, ActionGroup, Actions, BarRight, Between, BLOCK_TONE, Button, CARD_ROW, Check, Checkbox, Chip, ChipBar, CloseButton, Ctlbar, DRAWER_ACTIONS, DRAWER_BODY, DRAWER_HEAD, DRAWER_TITLE, Divider, Empty, ErrorText, ExportMenu, ExtLink, Field, FieldBlock, FilePick, FormGrid, FormRow, IconText, Input, LINK_CLS, LinkButton, Loading, MUTED, MUTED_MONO, MaybeNumberInput, Mono, Notice, NumberInput, PageStack, Panel, PanelHead, Row, Scrim, SearchInput, SectionTitle, Spinner, Status, TAG_DENSE, Table, Tabs, Tag, TagGroup, TextArea, Toolbar, Value, ViewSwitch, cellWrap, type Columns } from '../../components/ui'
import { floatingLayerOpen } from '../../lib/layers'
@@ -550,8 +551,16 @@ export default function Storyboard() {
/* ---------- 选中 / 检查器 ---------- */
async function select(id: number, syncUrl = true) {
if (!id) return
- if (id !== live.current.selectedId && live.current.dirty
- && !window.confirm('当前镜头有未保存的修改,切换后这些修改会丢失。继续切换?')) return
+ /* 未保存修改的三道闸(切换 / 关闭 / 新增)走站内确认框:问话只留一句,
+ 后果写进 desc,主按钮把要做的动作写出来(R19)。 */
+ if (id !== live.current.selectedId && live.current.dirty) {
+ const ok = await confirmAction({
+ title: '切换到别的镜头?',
+ desc: '当前镜头有未保存的修改,切换后这些修改会丢失。',
+ tone: 'warn', confirmText: '继续切换'
+ })
+ if (!ok) return
+ }
if (syncUrl && id !== live.current.selectedId) {
setParams((prev) => {
const next = new URLSearchParams(prev)
@@ -620,8 +629,14 @@ export default function Storyboard() {
}
async function closeInspector() {
- if (live.current.dirty
- && !window.confirm('当前镜头有未保存的修改,关闭后这些修改会丢失。仍然关闭?')) return false
+ if (live.current.dirty) {
+ const ok = await confirmAction({
+ title: '关闭分镜详情?',
+ desc: '当前镜头有未保存的修改,关闭后这些修改会丢失。',
+ tone: 'warn', confirmText: '仍然关闭', confirmIcon:
+ })
+ if (!ok) return false
+ }
setSelectedId(null)
setDetail(null)
setDirty(false)
@@ -639,9 +654,15 @@ export default function Storyboard() {
setBinding({ ...EMPTY_BINDING, character_ids: [], scene_ids: [] })
}
- function startCreate() {
- if (live.current.dirty
- && !window.confirm('当前镜头有未保存的修改,新增镜头会丢掉这些修改。继续新增?')) return
+ async function startCreate() {
+ if (live.current.dirty) {
+ const ok = await confirmAction({
+ title: '新增一个镜头?',
+ desc: '当前镜头有未保存的修改,新增镜头会丢掉这些修改。',
+ tone: 'warn', confirmText: '继续新增', confirmIcon:
+ })
+ if (!ok) return
+ }
setCreating(true)
setSelectedId(null)
setDetail(null)
@@ -734,7 +755,12 @@ export default function Storyboard() {
}
async function removeShot(shot: any) {
- if (!window.confirm(`确认删除镜头 #${shot.order_index} ${shot.title || ''}?已生成的产物文件保留,但镜头关联会解除。`)) return
+ const ok = await confirmAction({
+ title: `删除镜头 #${shot.order_index}${shot.title ? ' ' + shot.title : ''}?`,
+ desc: '已生成的产物文件保留,但镜头关联会解除,不可恢复。',
+ tone: 'danger', confirmText: '删除', confirmIcon:
+ })
+ if (!ok) return
if (live.current.selectedId === shot.id) {
setDirty(false)
await closeInspector()
@@ -864,7 +890,14 @@ export default function Storyboard() {
async function bulkAction(action: 'duplicate' | 'delete' | 'move' | 'patch', extra: any = {}, label = '') {
const ids = [...checked]
if (!ids.length) { setError('请先勾选镜头'); return }
- if (action === 'delete' && !window.confirm(`确认删除选中的 ${ids.length} 个镜头?`)) return
+ if (action === 'delete') {
+ const ok = await confirmAction({
+ title: `删除选中的 ${ids.length} 个镜头?`,
+ desc: '已生成的产物文件保留,但这些镜头的关联会解除,不可恢复。',
+ tone: 'danger', confirmText: '删除', confirmIcon:
+ })
+ if (!ok) return
+ }
const ok = await run(label || '批量操作',
() => api.post(`/api/projects/${projectId}/shots/bulk`, { action, shot_ids: ids, ...extra }))
if (ok) { clearCheck(); notify(label ? `${label}完成(${ids.length} 个镜头)` : '批量操作完成') }
diff --git a/frontend/src/pages/project/Timeline.tsx b/frontend/src/pages/project/Timeline.tsx
index b9851ca..43e7670 100644
--- a/frontend/src/pages/project/Timeline.tsx
+++ b/frontend/src/pages/project/Timeline.tsx
@@ -15,6 +15,7 @@ import { MediaThumb } from '../../components/media/MediaThumb'
import { refresh, useProjectStore } from '../../stores/project'
import { useSystemStore } from '../../stores/system'
import { notify } from '../../stores/notice'
+import { confirmAction } from '../../stores/confirm'
import { openPreview } from '../../stores/preview'
import { PageHead, ActionGroup, Actions, Button, Check, Chip, ChipBar, Ctlbar, Divider, Empty, ErrorText, ExtLink, Field, FieldBlock, FilePick, FormGrid, FormRow, Grid, Count, IconText, Input, IssueRow, Layout, LineHint, MONO, MUTED, MUTED_MONO, MaybeNumberInput, Mono, NumberInput, OptionGrid, PageStack, Panel, PanelHead, Row, Spinner, Status, Table, Tag, TagGroup, TextArea, Toolbar, Value } from '../../components/ui'
import { IconAdd, IconArrowDown, IconArrowUp, IconCheck, IconChevronDown, IconChevronUp, IconClose, IconDelete, IconEdit, IconEye, IconMic, IconPass, IconSound, IconStar, IconTracks, IconWarn } from '../../components/icons'
@@ -361,8 +362,12 @@ export default function Timeline() {
const row = selectedVersion
if (versions.length <= 1) { notify('只剩一个时间线版本,不能删除;可先构建新版本'); return }
const label = row ? `v${row.version}「${row.name}」` : `#${viewVersion}`
- if (!window.confirm(`删除时间线版本 ${label}?
-只删除编排记录(片段/字幕/音轨),已导出的成片与镜头产物不受影响。`)) return
+ const ok = await confirmAction({
+ title: `删除时间线版本 ${label}?`,
+ desc: '只删除编排记录(片段 / 字幕 / 音轨),已导出的成片与镜头产物不受影响。',
+ tone: 'danger', confirmText: '删除', confirmIcon:
+ })
+ if (!ok) return
const id = viewVersion
await run('删除版本', () => api.del(`/api/projects/${projectId}/timelines/${id}`), (r) => {
const back = r?.current_version ? `,已自动切换到 v${r.current_version}` : ''
@@ -377,7 +382,12 @@ export default function Timeline() {
}
async function removeOne(row: any) {
if (versions.length < 2) { notify('至少保留一个时间线版本'); return }
- if (!window.confirm(`删除时间线版本 v${row.version}「${row.name}」?\n只删除编排记录(片段/字幕/音轨),已导出成片与镜头产物不受影响。`)) return
+ const ok = await confirmAction({
+ title: `删除时间线版本 v${row.version}「${row.name}」?`,
+ desc: '只删除编排记录(片段 / 字幕 / 音轨),已导出的成片与镜头产物不受影响。',
+ tone: 'danger', confirmText: '删除', confirmIcon:
+ })
+ if (!ok) return
await run('删除版本', () => api.del(`/api/projects/${projectId}/timelines/${row.id}`), (r) => {
if (viewVersion === row.id) showVersion(null)
const back = r?.current_version ? `,已自动切换到 v${r.current_version}` : ''
@@ -582,7 +592,11 @@ export default function Timeline() {
{/* 四个字段一行放完:默认三列会把「结束 ms」单独甩到第二行,
起始 / 结束必须并排才看得出是一条区间。 */}
-
+ {/* 两列而不是四列:这块面板在 1280 只有 624 宽,四列每格 148——
+ 「所属镜头」的下拉值(镜号 + 镜头名)读不到一半,起始 / 结束也各自缩成一小截。
+ 两列 296 一格,起始 / 结束仍然并排(注释里那条要求没变)。
+ 控件撑满列宽由 FormRow 自带的表单作用域负责(app.css glue ①)。 */}
+
- patchSetting({ keep_shot_audio: v })} className="self-center"
- title="台词走模型原声时必须勾选:镜头产物自带的就是那条人声/音效/环境声轨,关掉等于把它剪掉。切到「平台配音」时建议取消勾选,否则原声人声会和配音叠成双声">
+ patchSetting({ keep_shot_audio: v })} title="台词走模型原声时必须勾选:镜头产物自带的就是那条人声/音效/环境声轨,关掉等于把它剪掉。切到「平台配音」时建议取消勾选,否则原声人声会和配音叠成双声">
保留镜头自带音轨(模型原生音画同步)
@@ -732,8 +750,8 @@ export default function Timeline() {
patchAudio({ gain_db: v })} />
- patchAudio({ loop: v })} className="self-center">循环铺满
- patchAudio({ ducking: v })} className="self-center">压低 BGM
+ patchAudio({ loop: v })}>循环铺满
+ patchAudio({ ducking: v })}>压低 BGM
{/* 「上传新文件」与「引用已有素材」是两条选择路径,各占一行;
已有素材是**从固定集合里挑一个**,走 OptionGrid 等宽格子(实测 13 个胶囊
diff --git a/frontend/src/stores/confirm.ts b/frontend/src/stores/confirm.ts
new file mode 100644
index 0000000..6d28b8f
--- /dev/null
+++ b/frontend/src/stores/confirm.ts
@@ -0,0 +1,67 @@
+/**
+ * 破坏性操作的确认框(2026-11 第十三轮):替掉全站 13 处 `window.confirm()`。
+ *
+ * 症状:浏览器原生 confirm 是**操作系统的窗口**——不是站内组件,主题、字号、
+ * 按钮、层级、语言全都由 Chrome/macOS 决定;文案里塞着一整段「会删掉什么、
+ * 影响哪些产物」,一个灰色文本框把它当成一句话显示,破坏性操作和「继续切换」
+ * 长得一模一样,用户只能条件反射点确定。它还是**同步阻塞**的:
+ * 页面脚本停在原地,动画和轮询全冻住。
+ * 做法:`confirmAction(options): Promise`,皮肤是 `components/ui/Confirm.tsx`
+ * (浮层唯一实现 kit `Modal` + 语义色块 + 两层文案 + 图标按钮,规范 R19)。
+ * 调用点从 `if (!window.confirm(t)) return` 改成 `if (!(await confirmAction({...}))) return`。
+ * 为什么是 Promise 而不是回调:这 13 处外层函数本来就全是 `async`,
+ * 一行 await 读起来和原来的 if 一样顺,不需要到处铺 `.then()`。
+ * 为什么不叠第二张:键盘上连按 Esc / 回车会把同一颗按钮触发多次,
+ * 原生 confirm 会排出一串窗口。这里已经开着就把后来的请求直接判「取消」,
+ * 画面永远只有一张确认框。
+ */
+import type { ReactNode } from 'react'
+import { create } from 'zustand'
+
+export type ConfirmOptions = {
+ /** 一句问话:「确认删除镜头 #3 …?」——动词 + 对象,不塞后果 */
+ title: string
+ /** 第二层:后果 / 影响范围 / 能不能恢复。原来全挤在 confirm 的那一句里 */
+ desc?: ReactNode
+ /** 语气:danger = 不可恢复(主按钮红底 + 描边),warn = 有代价但可逆,info = 只是要确认一下 */
+ tone?: 'danger' | 'warn' | 'info'
+ /** 主按钮文案,默认「确定」;破坏性操作一律写成动词(「删除」「停用」) */
+ confirmText?: string
+ /** 次按钮文案,默认「取消」 */
+ cancelText?: string
+ /** 主按钮图形:默认 ✓,删除类传 IconDelete */
+ confirmIcon?: ReactNode
+ /** 朗读用的浮层名(标题里塞了变量时给一句纯文本) */
+ label?: string
+}
+
+type ConfirmState = {
+ req: { id: number; options: ConfirmOptions } | null
+ resolver: ((v: boolean) => void) | null
+ answer: (v: boolean) => void
+}
+
+let seq = 0
+
+export const useConfirmStore = create((set, get) => ({
+ req: null,
+ resolver: null,
+ answer: (v) => {
+ const done = get().resolver
+ set({ req: null, resolver: null })
+ done?.(v)
+ }
+}))
+
+/** 弹一张确认框,返回「用户是否确认」;已有确认框开着时直接返回 false(不叠窗) */
+export function confirmAction(options: ConfirmOptions | string): Promise {
+ const state = useConfirmStore.getState()
+ if (state.req) return Promise.resolve(false)
+ const opts: ConfirmOptions = typeof options === 'string' ? { title: options } : options
+ return new Promise((resolve) => {
+ useConfirmStore.setState({ req: { id: ++seq, options: opts }, resolver: resolve })
+ })
+}
+
+/** 当前是否在确认(页面据此禁用其它快捷键,避免 Esc 一次关掉两层) */
+export function confirmOpen() { return useConfirmStore.getState().req !== null }
diff --git a/frontend/src/stores/notice.ts b/frontend/src/stores/notice.ts
index a8a0d37..2175615 100644
--- a/frontend/src/stores/notice.ts
+++ b/frontend/src/stores/notice.ts
@@ -1,46 +1,151 @@
/**
- * 全局操作提示(替代旧 project.ts 里的 pctx.notice 与手写的 )。
+ * 全局操作反馈(吐司)的状态:2026-11 第十三轮整层重写,**不再用 antd ``**。
*
- * 以前 notify() 写在项目共享状态上,只有项目详情页顶部那条横幅会显示它:
- * 资产库、模型中心里点「已存为 v3」之类的提示因此悄无声息。
- * 现在仍然只有 notify()/notifyBad() 两个入口(全站几百处调用不动),
- * 但落点是 antd 的 :
- * · 实例来自 app/providers.tsx 里 .useApp()——静态 message 在 antd v5
- * 拿不到 ConfigProvider 的 context,会丢主题与中文语言包;
- * · 位置、时长、堆叠、上下动画、可达性(role=status 的 aria-live)全是 antd 的,
- * 不再自己维护一个 items 数组和 setTimeout;
- * · 首帧之前 context 还没挂上,兜底走一次 message 队列,提示不会丢。
+ * 症状(用户原话「整体修改系统中所有提示窗、完成后的反馈 tips 等。不要使用默认组件」):
+ * 全站 63 处 `notify()` / `notifyBad()` 落的是 antd 出厂的 ``——
+ * 页面顶部正中一颗黑底小胶囊,只有「一个图形 + 一行白字」:
+ * ① 说完了「保存成功」却说不完后果(哪个版本、几个镜头、能不能撤销);
+ * ② 3 秒自动消失且**鼠标悬停不停**,报错里那句长文案根本读不完;
+ * ③ 同一次批量操作连续 notify 五次,就在原地叠五颗一模一样的胶囊;
+ * ④ 长得像另一家的组件:站内所有块都有描边、圆角、色块图标,只有它是纯黑药丸。
+ * 做法:状态留在这一层(调用点一个都不改),皮肤交给 `components/ui/Toast.tsx`:
+ * 右下角堆叠卡片、语义色块图标、标题 + 说明两层、底部倒计时条、悬停/聚焦暂停、
+ * 同一条消息去重成「×N」、最多同时 5 颗(超出挤掉最旧的一颗)。
+ * 色调只从 `components/ui/tone.tsx` 取,色值仍是 antd 语义 token。
+ * 为什么还用 zustand 而不是 antd 的 context 实例:反馈队列是**跨页面的全局状态**
+ * (换页要清空、灯箱与抽屉之上也要能显示),和 stores/preview.ts 的灯箱同一套做法;
+ * 挂在 app/providers.tsx 的 上之后,chromeless 的登录页也共用同一条队列。
+ * 兼容:`notify(msg)` / `notifyBad(msg)` 的旧签名原样保留(全站只传一个字符串),
+ * 新增对象入参给「一句结论 + 明细 + 撤销按钮」这种后续调用点用。
*/
-import { App as AntdApp, message as staticMessage } from 'antd'
-import { antdApi } from '../app/providers'
+import type { ReactNode } from 'react'
+import { create } from 'zustand'
+import type { FeedbackTone } from '../components/ui/tone'
-type Api = ReturnType['message']
-
-function api(): Api {
- return (antdApi.message as Api) || staticMessage
+/** 一颗吐司:id 单调递增,宿主用它做 key 与关闭定位 */
+export type ToastItem = {
+ id: number
+ tone: FeedbackTone
+ /** 一句结论(粗体第一行) */
+ title: string
+ /** 第二层:后果 / 范围 / 明细。没有就不占行 */
+ desc?: ReactNode
+ /** 停留秒数;0 = 不自动消失(进行中的长任务) */
+ duration: number
+ /** 右侧动作(「撤销」「查看」);自己负责调用点需要的副作用 */
+ action?: { label: string; onClick: () => void }
+ /** 同一条消息重复推送的次数(去重后显示 ×N) */
+ count: number
+ /** 最近一次推送的时间戳:宿主用它重启动倒计时 */
+ stamp: number
}
-/** 单条提示的停留时间:错误要多看两眼,成功一闪即可 */
-const DURATION = { ok: 3, bad: 5 }
+/** 同屏最多堆几颗:再多就是刷屏,挤掉最旧的那颗 */
+const MAX_VISIBLE = 5
+/** 单条提示的默认停留时间:错误要多看两眼,成功一闪即可 */
+const DURATION = { ok: 3, bad: 5, warn: 5, info: 4, loading: 0 }
+
+type NoticeState = {
+ items: ToastItem[]
+ push: (tone: FeedbackTone, input: ToastInput, duration?: number) => number
+ dismiss: (id: number) => void
+ clear: () => void
+}
+
+let seq = 0
+
+export const useNoticeStore = create((set, get) => ({
+ items: [],
+ push: (tone, input, duration) => {
+ const item = normalize(++seq, tone, input, duration)
+ set((s) => {
+ /* 去重:同一条文案 + 同一语气还在屏上,就把上面那颗「顶回去重读」,
+ 而不是并排叠五颗一模一样的(批量操作连点时最常见)。 */
+ const at = s.items.findIndex((x) => x.tone === item.tone && x.title === item.title)
+ if (at >= 0) {
+ const merged = { ...s.items[at], count: s.items[at].count + 1, stamp: item.stamp, duration: item.duration }
+ const rest = s.items.filter((_, i) => i !== at)
+ return { items: [...rest, merged] }
+ }
+ return { items: [...s.items, item].slice(-MAX_VISIBLE) }
+ })
+ return item.id
+ },
+ dismiss: (id) => set((s) => ({ items: s.items.filter((x) => x.id !== id) })),
+ clear: () => set({ items: [] })
+}))
+
+/** 进行中转圈用的句柄:调用方拿到 `done()`,用新语气原地替换那颗 */
+export type LoadingHandle = {
+ id: number
+ /** 结束:把它换成一条带新语气与新文案的吐司并重新计时;不传就是直接消失 */
+ done: (next?: {
+ tone?: FeedbackTone; title?: string; desc?: ReactNode; duration?: number
+ action?: { label: string; onClick: () => void }
+ }) => void
+}
+
+function normalize(id: number, tone: FeedbackTone, input: ToastInput, duration?: number): ToastItem {
+ const base = typeof input === 'string' ? { title: input } : input
+ return {
+ id, tone,
+ title: String(base.title ?? '').trim(),
+ desc: base.desc,
+ action: base.action,
+ duration: duration ?? base.duration ?? DURATION[tone],
+ count: 1,
+ stamp: Date.now()
+ }
+}
+
+/** 对象入参:`notify({ title, desc, action })`;字符串入参是最常用的简写 */
+export type ToastInput = string | {
+ title: string
+ desc?: ReactNode
+ duration?: number
+ action?: { label: string; onClick: () => void }
+}
+
+function push(tone: FeedbackTone, input: ToastInput, duration?: number) {
+ const text = typeof input === 'string' ? input : input.title
+ if (!text) return 0
+ return useNoticeStore.getState().push(tone, input, duration)
+}
/** 成功提示(沿用旧签名:绝大多数调用点只有一个字符串参数) */
-export function notify(message: string, duration = DURATION.ok) {
- if (!message) return
- api().success({ content: message, duration })
-}
+export function notify(message: ToastInput, duration?: number) { return push('ok', message, duration) }
+/** 失败提示 */
+export function notifyBad(message: ToastInput, duration?: number) { return push('bad', message, duration) }
+/** 需要注意但不致命(部分成功、降级、需要复核) */
+export function notifyWarn(message: ToastInput, duration?: number) { return push('warn', message, duration) }
+/** 纯信息(不带成败判断) */
+export function notifyInfo(message: ToastInput, duration?: number) { return push('info', message, duration) }
-/** 失败/警告提示 */
-export function notifyBad(message: string, duration = DURATION.bad) {
- if (!message) return
- api().error({ content: message, duration })
-}
-
-/** 进行中(长任务:导出、合成),返回带 .() 的句柄,调用方自己 destroy */
-export function notifyLoading(message: string) {
- return api().loading({ content: message, duration: 0 })
+/**
+ * 进行中(长任务:导出、合成)。返回句柄,调用方在 then/catch 里 `done()` 收尾:
+ * const h = notifyLoading('正在合成成片…')
+ * try { await compose(); h.done({ tone: 'ok', title: '成片已合成' }) }
+ * catch (e) { h.done({ tone: 'bad', title: '合成失败', desc: e.message }) }
+ */
+export function notifyLoading(message: ToastInput): LoadingHandle {
+ const id = push('loading', message)
+ return {
+ id,
+ done: (next) => {
+ const s = useNoticeStore.getState()
+ const cur = s.items.find((x) => x.id === id)
+ if (!cur) return
+ const tone = next?.tone ?? 'ok'
+ const text = next?.title ?? cur.title
+ if (!text) { s.dismiss(id); return }
+ s.dismiss(id)
+ s.push(tone, { title: text, desc: next?.desc, action: next?.action ?? cur.action }, next?.duration)
+ }
+ }
}
/** 换页 / 退出登录时清掉残留提示 */
-export function clearNotices() {
- api().destroy()
-}
+export function clearNotices() { useNoticeStore.getState().clear() }
+
+/** 给非组件代码(api 拦截器之类)读的当前队列 */
+export function noticeState() { return useNoticeStore.getState().items }
diff --git a/frontend/src/styles/app.css b/frontend/src/styles/app.css
index 8aad316..9501777 100644
--- a/frontend/src/styles/app.css
+++ b/frontend/src/styles/app.css
@@ -83,7 +83,7 @@ h3 { font-size: var(--ant-font-size-heading-5); line-height: var(--ant-line-heig
行 = antd `Row`/`Col`(FormRow)、横条 = antd `Flex`(Ctlbar)。
列边界与降列只有 Row/Col 一个来源(components/ui/grid.tsx),
旧的 --label-w / .nf-ctl / .nf-w-* / 六条 @media 降列整层删除。
- CSS 只剩下面这四件 antd 自己接不到的事。
+ CSS 只剩下面这六件 antd 自己接不到的事。
══════════════════════════════════════════════════════════════════════════ */
/* ① 控件撑满列宽。antd 的 Select / InputNumber / DatePicker 默认按内容取宽,
@@ -128,11 +128,32 @@ textarea) { width: 100%; min-width: 0 }
.nex-field-inline .ant-form-item-row { flex-wrap: nowrap; align-items: center }
.nex-field-inline .ant-form-item-label { flex: none; text-align: start; padding: 0; margin-inline-end: var(--ant-margin-xs) }
.nex-field-inline .ant-form-item-label > label { height: auto; white-space: nowrap; color: var(--ant-color-text) }
-/* 控件列吃 --nex-ctl-w(inline 的 narrow/wide 由组件写进变量);没写变量的字段照旧按内容定尺 */
-.nex-field-inline .ant-form-item-control { flex: none; width: var(--nex-ctl-w, auto) }
-/* 必填星号:antd 画在标签前,颜色取它自己的 colorError,这里只保证不被折行拆开 */
+/* 控件列吃 --nex-ctl-w(inline 的 narrow/wide 由组件写进变量);没写变量的字段照旧按内容定尺。
+ ⚠ 必须是「可收缩 + 上限」而不是 `flex: none; width: N`:控件列不参与挤压时,
+ 标签(nowrap) + 控件的自然宽度大于盒子拿到的宽度就会**捅出盒子**——
+ visualcheck 576 档 / 的「搜索」字段(盒子 flex-basis 220 实得 227,
+ 控件列 flex:none 撑到 220,标签 49 + 间隙 8 + 220 = 277)溢出 42px。
+ 现在标签列仍然 flex:none(标签永远不被压),控件列最宽 --nex-ctl-w、
+ 盒子变窄时它跟着缩,窄屏是「控件变短」而不是「控件掉出容器」。
+ 栅格里的字段(.nex-ctlbar-grid)要撑满整格,所以那里把上限解掉。 */
+.nex-field-inline .ant-form-item-control { flex: 1 1 auto; width: auto; min-width: 0; max-width: var(--nex-ctl-w, none) }
.nex-req { color: var(--ant-color-error); font-weight: var(--ant-font-weight-strong); margin-inline-start: 1px }
+/* ⑥ 一行里既有「标签在上」的字段、又有裸复选框时,复选框必须坐进控件那一行。
+ 症状(用户第一轮就在说「字段标题、控件不对齐」):分镜检查器「环境声 / 启用字幕」
+ 这一行,左边标签 30px + 输入框 32px,右边那颗复选框顶在 909——和输入框中心差 35px,
+ 读起来像它属于上一行。原因:FormRow 的列是块级 Col,调用点写的
+ `self-center` / `self-end` 在块容器里不参与对齐,等于没写。
+ 做法:由这里统一让位——先让出标签块(行高 × 字号 + marginXS = 30),
+ 再在 controlHeight 里垂直居中;整行都是复选框时(:has 不成立)不让位,
+ 因为没有标签行可对齐。调用点从此不再自己写对齐 class。 */
+.nex-form-row:has(.ant-form-item-label) > .ant-col > :is(.nex-check, .ant-checkbox-wrapper) {
+ display: flex;
+ align-items: center;
+ height: var(--ant-control-height);
+ margin-block-start: calc(var(--ant-font-size) * var(--ant-line-height) + var(--ant-margin-xs));
+}
+
/* ── 卡片(Panel = antd Card):标题与副标题是中文短语,默认 ellipsis 会裁掉半句 ── */
.nex-panel .ant-card-head-title { white-space: normal; overflow: visible; text-overflow: clip }
/* 标题条同理:中文短语不许被 ellipsis 裁掉半句,right 那一块也按内容折行。
@@ -145,6 +166,35 @@ textarea) { width: 100%; min-width: 0 }
放不下就整块掉到第二行。 */
.nex-panel .ant-card-head-wrapper { flex-wrap: wrap; row-gap: var(--ant-margin-xxs) }
.nex-panel .ant-card-extra { flex-shrink: 0; max-width: 100% }
+/* 手机档卡头(Panel 在 <576 挂 nex-head-stack,档位来自 Grid.useBreakpoint):
+ 右端那一块整块占一行,标题拿回整行宽度。上面那条 flex-wrap 救不了它——
+ 折行判定看的是 flex-basis,而 `.ant-card-head-title` 是 `flex:1 1 0`,
+ 浏览器永远认为 extra 放得下,于是 shrink 的是标题,中文标题就断成两行。
+ 做法:把 extra 的假想主轴宽写成整行(flex:1 1 100%),标题的 flex-basis
+ 从 0 放开成 auto(内容宽),两者的假想宽之和必然超过一行 → extra 确定地
+ 掉到第二行,标题在自己的那一行里 grow 满宽。
+ ⚠ 只写 extra 那条不够:标题 basis 是 0 时它能不能把动作挤下去,
+ 取决于 min-width:auto 算出的那一格 min-content(一个汉字 15px)——
+ `.ant-card-head-title` 在 antd 里是 overflow:hidden(min 归 0),
+ 这条链子中一环扣在别的规则上,版面就会退化成「标题只剩一条竖河」。
+ 该换行的是整块,不是字。 */
+.nex-panel.nex-head-stack .ant-card-head-wrapper { row-gap: var(--ant-margin-xs) }
+.nex-panel.nex-head-stack .ant-card-head-title { flex: 1 1 auto }
+.nex-panel.nex-head-stack .ant-card-extra { flex: 1 1 100%; margin-inline-start: 0 }
+/* 卡头里的块级横排(只读标签行 / chip 行 / 控件栏):那 12px 下边距是给
+ 「正文里两块之间」用的,坐进 48px 的卡头就成了压在下面的一段空档。
+ 症状(2026-11 第十四轮 · 用户原话「垂直居中对齐,和其它子页面要一致」+
+ 调度中心工具条截图):那一排 25px 的只读胶囊整体浮在卡头中线**上方 6px**
+ (= 12 的一半),同屏其它单行卡头偏的是 0.5px——肉眼就是「这排贴顶、下面空一截」。
+ ⚠ 调用点写了 `mb-0` 却压不住:Tailwind 的 utility 在 utilities 层,
+ 而本文件未分层,按 R13 那套层叠规则「未分层永远赢过分层」,
+ 归零只能写在同一层里、按结构命中(这条对全站卡头一次生效)。 */
+.nex-panel .ant-card-head :is(.ant-card-head-title, .ant-card-extra) :is(.nex-taggroup, .nex-chipbar, .nex-ctlbar) { margin-block: 0 }
+/* 卡头标题槽是 15px/600 的标题档(extra 继承同一档),只读胶囊与分段器坐进来时不许跟着变粗:
+ R16.3 的只读回显全站只有一档字重(正文里的 Tag 继承 body 的 400)。
+ 症状(同一条工具条):`任务执行:平台内即时执行` 在卡头里是 14px/600,
+ 同样的标签落在卡片正文里是 14px/400——同一枚胶囊在两级里两种字重。 */
+.nex-panel .ant-card-head :is(.ant-tag, .nex-chip, .ant-segmented) { font-weight: 400 }
/* Card 的 body 不是 flex 子项,里面的 Row/Col 想收缩必须先从 min-width:auto 解放出来 */
.nex-panel .ant-card-body { min-width: 0 }
.nex-panel .ant-card-body > * { min-width: 0 }
@@ -175,7 +225,7 @@ html[data-theme='dark'] .nex-panel.nex-pagehead {
var(--ant-color-bg-container) 58%);
}
.nex-panel.nex-pagehead > .ant-card-body { padding: var(--ant-padding-sm) var(--ant-padding-lg) }
-/* 门牌第一行(菜单同款图标 + 一级标题)定高 = 控件档。
+/* 门牌第一行(一级标题 + 右端主操作)定高 = 控件档。
症状(2026-11 第十二轮 · 用户原话「右侧的主功能入口要对齐」):主操作原先挂在
**整块页头**的垂直中线上,七站的职责说明有的两行有的一行,那颗主按钮在每一页的 y
都不一样;概览页没有动作时中线还空着。第一行既然定高,同排右对齐的动作组就必然
@@ -230,7 +280,35 @@ html[data-theme='dark'] .nex-panel.nex-pagehead {
同一行的控件右边缘因此必然对齐;胶囊选项铺进格子时同理要撑满。 */
.nex-ctlbar-grid > .ant-col { display: flex; align-items: center; gap: var(--ant-margin-xs); min-width: 0 }
.nex-ctlbar-grid > .ant-col > .ant-form-item { flex: 1 1 auto; min-width: 0 }
-.nex-ctlbar-grid .nex-field-inline .ant-form-item-control { flex: 1 1 auto; width: auto; min-width: 0 }
+.nex-ctlbar-grid .nex-field-inline .ant-form-item-control { flex: 1 1 auto; width: auto; min-width: 0; max-width: none }
+/* 末尾那格是 BarRight 时它吃掉整行剩下的宽度(见 Controls.tailRight / grid.FILL_AT),
+ 内容再靠右:这一格可能横跨好几列,动作组要贴着**容器**右缘而不是格子的左缘。 */
+.nex-ctlbar-grid > .nex-ctlbar-tail { justify-content: flex-end }
+/* 整组不可分割(§7):横排时把盒子钉在自然宽度,会折行的父容器于是把整组当一个 item 挪行。
+ 两个类的特异度才压得住同一个元素上 Tailwind 的 min-w-0;窄到一整行都放不下时
+ 这个类不上(useAutoStack 把整组翻成竖排),所以它永远不会捅破容器。 */
+.nex-action-group.nex-atom { min-width: max-content }
+/* 自动竖排那一档(useAutoStack 判定「一整行放不下」之后上的 .ant-flex-vertical):
+ 横排时用来「把辅助动作钉在最左」的 mr-auto / ml-auto,以及容器上的 items-center,
+ 在竖排里都变成缺陷——那几颗收成内容宽、贴左边或贴中间,和下面几颗参差。
+ 浮层底部(Overlay.DRAWER_ACTIONS 现在就是 ActionGroup)第一条就带 items-center,
+ 所以这两句写在 app.css:不在 @layer 里,特异度压得住 Tailwind utilities 层的
+ items-center / mr-auto(第 17 轮实测 mb-0 压不住 .nex-taggroup 是同一条反向证据)。 */
+.nex-action-group.ant-flex-vertical { align-items: stretch }
+.nex-action-group.ant-flex-vertical > * { margin-inline: 0 }
+
+/* ── 流程节点条(Steps):容器自适应网格,不是横向滚动的自然排列 ──────────
+ 症状:12 格 × 96px + 11 × 8px = 1244px 在任何视口都放不下,整条只能横滚,
+ 「把当前节点滚进视野」于是把前面的节点推出视野——项目概览 1440 档
+ scrollLeft=126(第 1 格被切一半)、1024 档 542(前 5 格看不见)、
+ 总控台那条 526px 宽溢出 718px=12 格里 9 格在视野外。
+ 做法:轨道下限由组件按 compact 档写进 --nex-step-min(完整 140 / 精简 128),
+ `auto-fill` 按**容器**宽度分列:项目页 1118px → 7 列 2 排、总控台半栏
+ 526px → 3 列、430 手机档 → 2 列。12 个节点一次全部可见,
+ 不滚动、不渐隐、不裁切,中文标题也不再折成「导出完整视 / 频」。
+ 为什么不用 antd Row/Col:Col 的断点读视口,读不到「这条 rail 坐在半栏里」。 */
+.nex-steps { display: grid; gap: var(--ant-margin-xs);
+ grid-template-columns: repeat(auto-fill, minmax(var(--nex-step-min, 140px), 1fr)) }
/* ── 下拉面板:宁可临时压住右边内容,也不让用户盲选 ────────────────────
症状:时间线 / 交付页的字幕模式、配音来源这些选项,文案本身就是说明
@@ -277,6 +355,25 @@ html[data-theme='dark'] .nex-panel.nex-pagehead {
这条必须排在 .nex-chip.ant-tag 之后——两条特异度相同(类+类),
写在前面会被上面的 display:inline-flex 覆盖回 inline-block,图标与文字的间隙就散了。 */
.nex-opt-cell .ant-tag { margin-inline-end: 0; width: 100%; justify-content: center }
+/* 未选中的选项也要有边界(2026-11 第七轮目视)。
+ 症状:antd 的 CheckableTag 未选中态是**完全透明**的,铺进等宽格子后
+ 「出片预设」6 格、「引用已有素材」13 格读起来像两行居中的散文——
+ 看不出这是一组可点的选项,更数不清第几格;ChipBar 的胶囊流没这个毛病,
+ 因为胶囊彼此分开、文案长短本身就在说「这是一颗一颗的」。
+ 做法:只给坐在格子里的选项补次级描边 + 中性底(fill-alter 与站内其它表面同族,
+ tagcheck 量的「这一层自己有没有加色」≈0,仍是中性);选中态照旧由 antd 的
+ 主色实心表达,不参与这条。border-box 下加边框不改格子宽度,gridcheck 不受影响。
+ 特异度:antd 5.29 把样式注到 里、和 app.css 抢先后,所以这里堆到 5 个类,
+ 不靠顺序取胜。 */
+.nex-opt-cell .nex-chip.ant-tag.ant-tag-checkable:not(.ant-tag-checkable-checked) {
+ border: 1px solid var(--ant-color-border-secondary);
+ background: var(--ant-color-fill-alter);
+}
+.nex-opt-cell .nex-chip.ant-tag.ant-tag-checkable:not(.ant-tag-checkable-checked):hover {
+ border-color: var(--ant-color-primary-border-hover);
+ background: var(--ant-color-fill-secondary);
+ color: var(--ant-color-primary-hover);
+}
/* 多选回显 = antd Tag(closable):与 Tag 同度量,色调走 primary 那一族 */
.nex-tag-chip.ant-tag {
@@ -314,7 +411,16 @@ html[data-theme='dark'] .nex-panel.nex-pagehead {
white-space: nowrap;
vertical-align: middle;
box-sizing: border-box;
+ /* 标签最宽只能到它所坐容器的内容盒(第 16 轮:/assets 场景卡把整句「光线」
+ 当标签渲染,nowrap 的长标签直接捅出卡片右缘 204px)。
+ 配合下面 .nex-tag-text 的 ellipsis,收不下时在**标签内部**省略,
+ 而不是把容器顶宽或冲出容器——完整文案由 title 悬停给出。 */
+ max-width: 100%;
+ overflow: hidden;
}
+/* 标签文字的省略号落点:.nex-tag 是 inline-flex,text-overflow 落在匿名 flex item
+ 上没有选得中,所以由 Status.tsx 给文字套这一层 span(min-width:0 才允许收缩)。 */
+.nex-tag-text { min-width: 0; overflow: hidden; text-overflow: ellipsis }
/* 标签的底色只有一档:中性 fill-tertiary(= antd Tag bordered=false 的默认底)。
语义色不再铺底(用户第七轮「浅绿色标签都要处理到新的颜色设计上」)——整屏的
「完成 / 已交付 / 合格」如果各是一块浅绿,绿色就从语义色变成了第二个品牌色,
@@ -338,6 +444,18 @@ html[data-theme='dark'] .nex-tag.ant-tag { background: color-mix(in srgb, var(--
--tag-gap: var(--tag-gap-sm);
--tag-text: var(--tag-text-sm);
}
+/* 表格自己就是那个「容器」:站内表格一律 size=sm,是全站最密的地方,
+ 档位令牌在这里压到底,单元格里的 Tag / Status / Badge 整片一起降一档,
+ 页面不必逐个写 size="sm"(规范 §8.1「两档令牌挂在容器上」的表格那一半)。
+ ⚠ 这条在 antd 重写时丢过一次,丢了没人报错:审查页「自动质检清单」的「结论」列
+ 宽 104、扣掉左右内边距只剩 88,而 md 档的「人工不合格」要 98,整格 nowrap
+ 把标签顶出内容盒右缘 10px(tableaudit 新加的「格子内容越界」判据抓到的就是它)。 */
+.nex-table {
+ --tag-h: var(--tag-h-sm);
+ --tag-px: var(--tag-px-sm);
+ --tag-gap: var(--tag-gap-sm);
+ --tag-text: var(--tag-text-sm);
+}
/* 单个标签的密集档(容器挂 TAG_DENSE 时不需要它) */
.nex-tag-solo-sm {
--tag-h: var(--tag-h-sm);
@@ -347,7 +465,7 @@ html[data-theme='dark'] .nex-tag.ant-tag { background: color-mix(in srgb, var(--
}
/* 数字气泡:与标签同度量,只收成 pill 并加粗 */
.nex-badge { border-radius: 9999px; font-weight: var(--ant-font-weight-strong) }
-.nex-tag-icon { display: inline-flex; align-items: center; line-height: 0 }
+.nex-tag-icon { display: inline-flex; align-items: center; line-height: 0; flex: none }
/* 只读标签行:组内一档、组与下方一档半,定死不商量 */
.nex-taggroup { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ant-margin-xs); min-width: 0; margin-block-end: var(--ant-margin-sm) }
.nex-taggroup > span:first-child { flex: none }
@@ -407,7 +525,8 @@ html[data-theme='dark'] .nex-tag.ant-tag { background: color-mix(in srgb, var(--
.ant-drawer .ant-picker-dropdown,
.ant-drawer .ant-cascader-dropdown,
.ant-drawer .ant-dropdown { z-index: 1100 }
-.ant-message { z-index: 1200 }
+/* 自绘吐司(.nex-toast-region)也取 1200:它替掉的正是 antd message 的那一层,
+ 要压得住抽屉与模态,见文件末尾「反馈四级表面」那一节。 */
/* 抽屉 / 弹窗的滚动区统一用细描边滚动条(与 index.css 的 scrollbar-slim 同一条配方) */
.ant-drawer-body, .ant-modal-body { scrollbar-width: thin; scrollbar-color: var(--ant-color-fill) transparent }
.ant-drawer-body::-webkit-scrollbar, .ant-modal-body::-webkit-scrollbar { width: 8px; height: 8px }
@@ -436,36 +555,50 @@ html[data-theme='dark'] .nex-tag.ant-tag { background: color-mix(in srgb, var(--
为什么用 color-mix 而不是新色值:站内 `#hex` 只许出现在 theme/antd.ts(§2),
这里按语义色变量比例混合,明暗两档自动跟着主题走,不产生第二套色板。 */
.nex-stat { --nex-stat-tint: var(--ant-color-primary) }
-/* 色块族(统计卡 / 内容页门牌 / 概况抽屉的七站行):一套几何两档大小。
- 门牌那枚(.nex-pagehead-mark)取的是 `app/layout/nav.tsx` 里菜单项的图形本身,
- 和侧栏同一份 ReactNode——菜单换图当天页头跟着换,不存在「两边长得不一样」。
- `--nex-stat-tint` 缺省时落回主色:页头与抽屉行没有 tone,统计卡才有。 */
-.nex-stat-mark, .nex-pagehead-mark, .nex-brief-mark {
+/* 色块族(统计卡 / 概况抽屉的七站行 / 吐司 / 提示条 / 确认框):
+ 一套几何**两档大小**,语义色由宿主写进 `--nex-mark-tint`。
+ 2026-11 第十四轮(用户原话「不要图标」):内容页门牌那一枚从族里退出了——
+ 门牌左侧那块主色方块和左栏高亮项说的是同一句话(R18 每级信息只说一遍),
+ 而一屏里紧接着还有卡头的品牌 N 与统计卡色块,三颗同形状方块互相抢焦点。
+ `PageHead` 的 icon/反查机制、`.nex-pagehead-title` 的左缘因此一起回到卡内边距。
+ 变量在 2026-11 第十三轮从 `--nex-stat-tint` 改名成 `--nex-mark-tint`:
+ 原来只有统计卡有色调可给,反馈三兄弟自绘之后都要说同一句「这块图形是什么语气」,
+ 出处是 components/ui/tone.tsx 那张唯一的语义表。统计卡那条老变量在本族内兜住,
+ 页面与 Panel 里的 Stat 一个字都不用改。 */
+.nex-stat-mark, .nex-brief-mark,
+.nex-toast-mark, .nex-notice-mark, .nex-confirm-mark {
display: flex;
align-items: center;
justify-content: center;
flex: none;
- background: color-mix(in srgb, var(--nex-stat-tint, var(--ant-color-primary)) 12%, transparent);
- color: var(--nex-stat-tint, var(--ant-color-primary));
+ background: color-mix(in srgb, var(--nex-mark-tint, var(--ant-color-primary)) 12%, transparent);
+ color: var(--nex-mark-tint, var(--ant-color-primary));
}
-.nex-stat-mark, .nex-pagehead-mark {
+/* 大档:数字左侧、吐司与确认框的问话——凡是「一块卡片级表面」上的色块 */
+.nex-stat-mark, .nex-toast-mark, .nex-confirm-mark {
inline-size: 32px;
block-size: 32px;
border-radius: var(--ant-border-radius-lg);
font-size: 17px;
}
-/* 概况抽屉里的七站行整行只有 34px,色块降到控件小档,不然行高被它顶开 */
-.nex-brief-mark {
+/* 小档:色块坐在**一行文字**旁边的地方——概况抽屉的七站行(整行 34px)与提示条。
+ 降一档不是为了好看,是因为 32px 会把行高顶开,一屏四条提示就散了。 */
+.nex-brief-mark, .nex-notice-mark {
inline-size: 20px;
block-size: 20px;
border-radius: var(--ant-border-radius-sm);
font-size: var(--ant-font-size-sm);
}
html[data-theme='dark'] .nex-stat-mark,
-html[data-theme='dark'] .nex-pagehead-mark,
-html[data-theme='dark'] .nex-brief-mark {
- background: color-mix(in srgb, var(--nex-stat-tint, var(--ant-color-primary)) 18%, transparent);
+html[data-theme='dark'] .nex-brief-mark,
+html[data-theme='dark'] .nex-toast-mark,
+html[data-theme='dark'] .nex-notice-mark,
+html[data-theme='dark'] .nex-confirm-mark {
+ background: color-mix(in srgb, var(--nex-mark-tint, var(--ant-color-primary)) 18%, transparent);
}
+/* 统计卡的色调写在卡上(--nex-stat-tint,Panel.tsx 的 Stat 按 tone 给):
+ 本族改读 --nex-mark-tint 之后在这里接一次,卡面自己仍是 antd 的 colorBgContainer。 */
+.nex-stat-mark { --nex-mark-tint: var(--nex-stat-tint, var(--ant-color-primary)) }
/* ── 只读回显(Info = antd Descriptions):R16.3 ──────────────────────────────
症状(用户截图:模型卡里「资源地址 / 参考」那只灰盒):回显写成灰底圆角盒 +
@@ -523,3 +656,162 @@ html[data-theme='dark'] .nex-info .ant-descriptions-item-label {
/* 页签条自带 16px 下边距(antd .ant-tabs-nav):它在 PageStack 里就是「和下一块的距离」,
与父级 gap 重复会空出 32px。归零之后页签与正文之间仍是站内那一档 16。 */
.nex-stack > .ant-tabs > .ant-tabs-nav { margin-block-end: 0 }
+
+/* ══════════════════════════════════════════════════════════════════════════
+ 反馈四级表面(R19 · 2026-11 第十三轮)
+ -----------------------------------------------------------------------------
+ 症状(用户原话「整体修改系统中所有提示窗、完成后的反馈 tips 等。
+ 不要使用默认组件」):反馈原本是三件默认组件拼出来的——
+ antd ``(顶部正中一颗纯黑药丸:无描边、无色块、悬停不暂停、
+ 重复推送叠成一串一模一样的胶囊、长报错读不完)、
+ `window.confirm`(操作系统的灰窗口:主题/字号/按钮/语言全不归站内,
+ 问话与后果挤成一行,还同步阻塞把动画冻在原地)、
+ antd `Alert`(站内唯一一套不带 R16.3 语义底纹的信息块,且没有善后动作位)。
+ 做法:四级表面各有唯一实现,全部自绘,全部只读两把现成的尺子——
+ ① 色块族(上面那一节,两档大小 + `--nex-mark-tint`);
+ ② 语义底纹 `BLOCK_TONE`(R16.3 那把尺子,提示条直接复用)。
+ 色值一律是 antd 语义 token(`--ant-color-*`),这里没有一个新的颜色。
+ 动画时长写成字面量并在这里注明出处:`applyRootVars` 只把
+ color/borderRadius/boxShadow/font*/lineHeight/controlHeight/margin/padding/screen
+ 抄到 `:root`,motion 那一族不在名单里——吐司与提示条都挂在 `:root` 那棵子树上
+ (吐司挂在 body 级容器、模态 portal 出 `.ant-app`),读不到 `--ant-motion-*`。
+ .2s = antd motionDurationMid,.3s = motionDurationSlow。
+ 为什么 .ant-* 只出现在这一层:页面不准 import antd(R8),皮肤也就只有这一个落点。
+ ══════════════════════════════════════════════════════════════════════════ */
+
+/* ── ② 提示条 Notice:卡内的轻量层(替 antd Alert)──────────────────────────
+ 容器(描边 + 底纹 + 圆角 + 内边距)由 Panel.tsx 的 BLOCK_TONE 给,
+ 这里只管色块右边的两行文字——与 antd Alert 的两层结构逐项对齐。 */
+.nex-notice { min-width: 0 }
+.nex-notice .nex-notice-mark { margin-block-start: 1px }
+.nex-notice-title {
+ color: var(--ant-color-text);
+ overflow-wrap: anywhere;
+}
+.nex-notice-desc {
+ margin-block-start: 2px;
+ color: var(--ant-color-text-description);
+ font-size: var(--ant-font-size-sm);
+ line-height: var(--ant-line-height-relaxed);
+ overflow-wrap: anywhere;
+}
+/* 关闭键与右端的善后按钮都要贴着第一行,不能跟着整块垂直居中 */
+.nex-notice .nex-notice-close { flex: none; margin-block-start: calc(-1 * var(--ant-padding-xxs)) }
+.nex-notice-action { flex: none }
+
+/* ── ③ 吐司 Toast:右下角堆叠卡片(替 antd message)────────────────────────
+ 为什么右下角:顶部正中压住的正是门牌与主操作(上一轮刚要求「右侧的主功能入口要对齐」),
+ 反馈不该把刚点的那颗按钮盖掉。
+ 为什么 `pointer-events:none` + 卡片自己 auto:这一层是贴边的 360px 竖条,
+ 底下往往是正文与滚动区,容器不许吃掉那条带上的任何一次点击。 */
+.nex-toast-region {
+ position: fixed;
+ inset-inline-end: var(--ant-margin-lg);
+ inset-block-end: var(--ant-margin-lg);
+ z-index: 1200;
+ display: flex;
+ flex-direction: column-reverse;
+ gap: var(--ant-margin-xs);
+ width: min(360px, calc(100vw - 2 * var(--ant-margin-lg)));
+ pointer-events: none;
+}
+.nex-toast {
+ position: relative;
+ display: flex;
+ align-items: flex-start;
+ gap: var(--ant-margin-sm);
+ padding: var(--ant-padding-sm) var(--ant-padding);
+ border: 1px solid var(--ant-color-border-secondary);
+ border-radius: var(--ant-border-radius-lg);
+ background: var(--ant-color-bg-elevated);
+ box-shadow: var(--ant-box-shadow-secondary);
+ /* 底部倒计时条要贴着圆角内侧裁掉 */
+ overflow: hidden;
+ pointer-events: auto;
+ animation: nex-toast-in .2s ease-out both;
+}
+@keyframes nex-toast-in {
+ from { opacity: 0; transform: translateY(var(--ant-margin-xs)) }
+ to { opacity: 1; transform: none }
+}
+.nex-toast-title {
+ color: var(--ant-color-text);
+ font-weight: var(--ant-font-weight-strong);
+ overflow-wrap: anywhere;
+}
+.nex-toast-desc {
+ margin-block-start: 2px;
+ color: var(--ant-color-text-secondary);
+ font-size: var(--ant-font-size-sm);
+ line-height: var(--ant-line-height-relaxed);
+ overflow-wrap: anywhere;
+}
+/* 重复次数:同一条文案被推 N 次只显示一颗(去重在 stores/notice.ts),
+ 这颗角标说的就是「其实发生了 N 次」,所以它跟在标题后头,不另起一行。 */
+.nex-toast-count {
+ margin-inline-start: var(--ant-margin-xxs);
+ color: var(--ant-color-text-tertiary);
+ font-size: var(--ant-font-size-sm);
+ font-weight: 400;
+ font-variant-numeric: tabular-nums;
+}
+.nex-toast .nex-toast-close { flex: none; margin-block-start: calc(-1 * var(--ant-padding-xxs)) }
+/* 倒计时条:JS 与 CSS 同源——时长由组件写进 --nex-toast-ms,
+ 悬停/聚焦时 .is-paused 把动画按停,与此同时 stores 那边的计时器也真的停了。 */
+.nex-toast-progress {
+ position: absolute;
+ inset-inline: 0;
+ inset-block-end: 0;
+ block-size: 2px;
+ transform-origin: left center;
+ background: color-mix(in srgb, var(--nex-mark-tint, var(--ant-color-primary)) 55%, transparent);
+ animation: nex-toast-countdown var(--nex-toast-ms, 3s) linear both;
+}
+.nex-toast.is-paused .nex-toast-progress { animation-play-state: paused }
+@keyframes nex-toast-countdown {
+ from { transform: scaleX(1) }
+ to { transform: scaleX(0) }
+}
+/* ── ④ 确认框 Confirm:破坏性操作的第二道闸(替 window.confirm)────────────
+ 外壳(遮罩 / 圆角 / 内边距 / 阴影 / 底部动作条)都是 kit Modal 与 antd token 的,
+ 这里只补两件事:问话区的两行文字,和危险档那一圈语义描边。 */
+.nex-confirm .ant-modal-body { padding-block-start: 0 }
+.nex-confirm-body {
+ display: flex;
+ align-items: flex-start;
+ gap: var(--ant-margin-sm);
+ min-width: 0;
+}
+.nex-confirm-title {
+ color: var(--ant-color-text);
+ font-size: var(--ant-font-size-lg);
+ line-height: var(--ant-line-height);
+ font-weight: var(--ant-font-weight-strong);
+ overflow-wrap: anywhere;
+}
+.nex-confirm-desc {
+ margin-block-start: var(--ant-margin-xxs);
+ color: var(--ant-color-text-tertiary);
+ line-height: var(--ant-line-height-relaxed);
+ overflow-wrap: anywhere;
+}
+/* 危险档给一圈 error 描边:整张框的颜色就是「这一步不好回退」,
+ 不用读文案也能感觉到(原生 confirm 里删除和「继续切换」长得一模一样)。
+ 语气写在问话区(.nex-confirm-body[data-tone]),描边却画在祖先 .ant-modal-content 上,
+ 自定义属性只会向下继承,所以这里用 :has() 把语气提到模态根节点上再落进变量。 */
+.nex-confirm { --nex-confirm-edge: var(--ant-color-border-secondary) }
+.nex-confirm:has(.nex-confirm-body[data-tone='danger']) { --nex-confirm-edge: var(--ant-color-error-border) }
+.nex-confirm:has(.nex-confirm-body[data-tone='warn']) { --nex-confirm-edge: var(--ant-color-warning-border) }
+.nex-confirm .ant-modal-content { border: 1px solid var(--nex-confirm-edge) }
+
+/* ── 悬浮提示 Tooltip:站内唯一还在用的默认组件,换肤不换件 ──────────────────
+ 症状:app/layout 的头像、主题开关这些纯图标按钮靠 Tooltip 解释自己是干什么的,
+ 而 antd 出厂是**纯黑药丸**——深色工作台里它比正文还亮,浅色下又是一块死黑,
+ 和站内所有浮层(描边 + 抬升底色 + 阴影)没有共同语言。
+ 做法:底色与文字在 theme/antd.ts 用组件 token 换成 elevated / text(不产生新色值),
+ 这里只补它没有的那两样:一圈描边和一层阴影,让它和抽屉、菜单浮起同一档。 */
+.ant-tooltip .ant-tooltip-inner {
+ border: 1px solid var(--ant-color-border-secondary);
+ box-shadow: var(--ant-box-shadow-secondary);
+ font-size: var(--ant-font-size-sm);
+}
diff --git a/frontend/src/theme/antd.ts b/frontend/src/theme/antd.ts
index 1647924..4617de5 100644
--- a/frontend/src/theme/antd.ts
+++ b/frontend/src/theme/antd.ts
@@ -245,6 +245,22 @@ export function buildAntdTheme(mode: ThemeMode): ThemeConfig {
headerFontSize: 15,
headerHeight: 48
},
+ /**
+ * 悬浮提示(2026-11 第十三轮):站内唯一还在用的默认浮层,换肤不换件。
+ * 症状:antd 出厂的 Tooltip 是**纯黑药丸**(colorBgSpotlight 走反色文字基准),
+ * 浅色下是一块死黑、深色下又比正文还亮,和站内所有浮层
+ * (抬升底色 + 描边 + 阴影)没有共同语言;而纯图标按钮的说明只能靠它(R11)。
+ * 做法:底色与文字取 antd 自己的两个表面 token——colorBgElevated 底 +
+ * colorTextBase 字,明暗两档自动跟主题,不引入任何新色值;
+ * 它没有描边与阴影的槽位,那一圈由 styles/app.css 的 `.ant-tooltip-inner` 补。
+ * 为什么不换成自绘组件:定位、延迟、触屏、aria-describedby 这些是 Tooltip 的本职,
+ * 「不要用默认组件」指的是站内那几张**反馈表面**(吐司 / 确认框 / 提示条),
+ * 不是把浮层定位重写一遍。原生 `title` 属性(纯图标按钮的 aria 兜底)同理保留。
+ */
+ Tooltip: {
+ colorBgSpotlight: seed.colorBgElevated,
+ colorTextLightSolid: seed.colorTextBase
+ },
/** 表格:密度交给 antd 自己的三档 size,这里只让表头与分割线跟站内描边一致 */
Table: {
headerSplitColor: 'transparent',