收敛CAD导入弹窗白曜石视觉

This commit is contained in:
WuYongJie 2026-05-12 09:23:05 +08:00
parent 21f1cd5a1b
commit 116c2b3705
5 changed files with 51 additions and 20 deletions

View File

@ -54,7 +54,7 @@
- `Inspector(检视器)`、数据列表、表格、长文本和表单密集区必须优先保证可读性,不能用毛玻璃承载正文。
- 毛玻璃只允许用于顶栏、HUD、浮动工具条和轻量状态浮层。
- 板材、五金、组件、包装等资产应按 `Meta Component(元组件)` 表达,而不是普通图片卡片。
- 如果苹果风格视觉标准与白曜石工坊标准冲突,新平台主链和后台管理页面优先执行白曜石工坊标准;苹果风格标准只作为基础组件、交互细节和可访问性补充参考。
- 苹果风格视觉标准已降级为历史参考,不再作为新平台主链、后台管理页面、弹窗或验收的视觉依据。
## 6. 前端责任口径
@ -100,7 +100,3 @@
- `furniture-3d-system/docs/设计规范/白曜石工坊统一视觉标准.md`
- `furniture-3d-system/docs/workflow/规范审查清单.md`
补充参考:
- `furniture-3d-system/docs/设计规范/苹果风格视觉标准.md`

View File

@ -13,7 +13,7 @@
- 有没有明显偏离当前统一视觉标准
- 新平台主链页面、后台管理页面是否优先符合 `白曜石工坊统一视觉标准.md`
- `苹果风格视觉标准.md` 是否只作为基础组件、交互细节和可访问性补充参考
- 是否仍把旧苹果风格规范当作当前视觉依据;新平台验收只按白曜石工坊口径判断
- 有没有临时拼凑感很强的新界面
- 新页面和现有页面的层级、间距、交互有没有失控

View File

@ -2567,7 +2567,7 @@ export default function AssetCenterClient({
<button
type="button"
onClick={openCreateFamilyModal}
className="text-xs text-apple-blue hover:underline"
className="text-xs font-medium text-[var(--obs-shell-title)] hover:underline"
>
创建第一个资产族
</button>
@ -3267,15 +3267,22 @@ export default function AssetCenterClient({
) : null}
{!cadImportResult && selectedCadImportFamily ? (
<div className="rounded-md border border-[var(--obs-shell-border)] bg-[var(--obs-shell-muted-bg)] px-4 py-3">
<div
data-testid="cad-import-target-family"
className="rounded-md border px-4 py-3"
style={{
backgroundColor: 'var(--obs-shell-surface-bg)',
borderColor: 'var(--obs-shell-border)',
}}
>
<div className="flex items-start justify-between gap-3">
<div className="min-w-0">
<p className="text-[10px] uppercase tracking-[0.16em] text-apple-label-tertiary mb-0.5">目标资产族</p>
<p className="mb-0.5 text-[10px] uppercase tracking-[0.16em] text-[var(--obs-shell-muted)]">目标资产族</p>
<div className="flex items-center gap-2">
<p className="text-sm font-apple-semibold text-apple-label-primary truncate">
<p className="truncate text-sm font-semibold text-[var(--obs-shell-title)]">
{selectedCadImportFamily.name}
</p>
<span className="text-[10px] bg-apple-bg-primary text-apple-label-secondary border border-apple-separator/30 px-1.5 py-0.5 rounded-md font-mono">
<span className="rounded-md border border-[var(--obs-shell-border)] bg-[var(--obs-shell-control-bg)] px-1.5 py-0.5 font-mono text-[10px] text-[var(--obs-shell-muted)]">
{selectedCadImportFamily.code}
</span>
</div>
@ -3286,7 +3293,7 @@ export default function AssetCenterClient({
{!cadImportResult && !selectedCadImportFamily && (
<div
className="rounded-md border px-4 py-3 text-xs text-apple-label-secondary"
className="rounded-md border px-4 py-3 text-xs text-[var(--obs-shell-muted)]"
style={{
backgroundColor: 'var(--obs-shell-warning-bg)',
borderColor: 'var(--obs-shell-warning-border)',
@ -3372,23 +3379,24 @@ export default function AssetCenterClient({
) : null}
<div className="space-y-1">
<p className="mb-2 text-[11px] font-apple-semibold uppercase tracking-[0.16em] text-apple-label-tertiary">CAD 导出模型包</p>
<p className="mb-2 text-[11px] font-semibold uppercase tracking-[0.16em] text-[var(--obs-shell-muted)]">CAD 导出模型包</p>
<label
data-testid="cad-import-file-dropzone"
className={cn(
'flex cursor-pointer items-center gap-3 rounded-apple-xl border border-dashed bg-apple-bg-secondary/30 px-4 py-4 transition hover:border-apple-blue/40 hover:bg-apple-blue/5',
'flex cursor-pointer items-center gap-3 rounded-md border border-dashed bg-[var(--obs-shell-surface-bg)] px-4 py-4 transition hover:border-[var(--obs-shell-action-border)] hover:bg-[var(--obs-shell-hover-bg)]',
cadImportSubmitAttempted && cadImportFieldErrors.file
? 'border-apple-red/60'
: 'border-apple-separator/50',
? 'border-[var(--obs-shell-danger-border)]'
: 'border-[var(--obs-shell-border)]',
)}
>
<div className="flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-white shadow-apple-sm text-apple-label-secondary border border-apple-separator/20">
<div className="flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-[var(--obs-shell-border)] bg-[var(--obs-shell-control-bg)] text-[var(--obs-shell-icon-text)]">
<FileUp className="h-5 w-5" />
</div>
<div className="min-w-0 flex-1">
<p className={cn("text-sm font-apple-medium truncate", cadImportForm.file ? "text-apple-label-primary" : "text-apple-label-secondary")}>
<p className={cn("truncate text-sm font-medium", cadImportForm.file ? "text-[var(--obs-shell-title)]" : "text-[var(--obs-shell-muted)]")}>
{cadImportForm.file ? cadImportForm.file.name : '选择 ZIP 格式文件上传'}
</p>
<p className="text-xs text-apple-label-tertiary mt-0.5 truncate">
<p className="mt-0.5 truncate text-xs text-[var(--obs-shell-subtle)]">
{cadImportParsing ? '正在读取文件并带出命名建议…' : '包含模型几何与 hardware.json 参数,尺寸按包围盒回填'}
</p>
</div>
@ -3410,7 +3418,7 @@ export default function AssetCenterClient({
)}
</div>
{cadImportSubmitAttempted && cadImportFieldErrors.file && (
<p className="text-[11px] text-apple-red font-apple-medium">{cadImportFieldErrors.file}</p>
<p className="text-[11px] font-medium text-[var(--obs-shell-danger)]">{cadImportFieldErrors.file}</p>
)}
</div>
</div>

View File

@ -334,6 +334,12 @@ describe('AssetCenterClient workflow', () => {
expect(screen.getByText('导入 CAD 规格款 · 板材')).toBeInTheDocument()
expect(screen.getByPlaceholderText('BOARD-VARIANT-001')).toHaveValue('BOARD-001-')
expect(screen.getByPlaceholderText('例如 桌面板 1200 / 方管桌腿 / 十字连接件')).toHaveValue('BOARD-001-')
expect(screen.getByTestId('cad-import-target-family')).toHaveStyle({
backgroundColor: 'var(--obs-shell-surface-bg)',
borderColor: 'var(--obs-shell-border)',
})
expect(screen.getByTestId('cad-import-target-family').className).not.toMatch(/apple-blue|bg-blue|sky|cyan/)
expect(screen.getByTestId('cad-import-file-dropzone').className).not.toMatch(/apple-blue|bg-blue|sky|cyan/)
expect(screen.getByText('基础资料库')).toBeInTheDocument()
expect(screen.getByRole('link', { name: /去基础资料库补录/ })).toHaveAttribute(
'href',

View File

@ -930,6 +930,27 @@
color: var(--obs-shell-muted) !important;
}
.obsidian-modal-panel [class*="bg-apple-blue"],
.obsidian-modal-panel [class*="bg-blue"],
.obsidian-modal-panel [class*="bg-sky"],
.obsidian-modal-panel [class*="bg-cyan"] {
background-color: var(--obs-shell-hover-bg) !important;
}
.obsidian-modal-panel [class*="border-apple-blue"],
.obsidian-modal-panel [class*="border-blue"],
.obsidian-modal-panel [class*="border-sky"],
.obsidian-modal-panel [class*="border-cyan"] {
border-color: var(--obs-shell-border) !important;
}
.obsidian-modal-panel [class*="text-apple-blue"],
.obsidian-modal-panel [class*="text-blue"],
.obsidian-modal-panel [class*="text-sky"],
.obsidian-modal-panel [class*="text-cyan"] {
color: var(--obs-shell-title) !important;
}
.obsidian-modal-panel [class*="bg-apple-green"],
.obsidian-modal-panel [class*="bg-green"],
.obsidian-modal-panel [class*="bg-emerald"] {