feat(desktop): 工业化升级 A —— 设计系统地基(primitives + lucide + 语义令牌)

把"手搓内联 class + Unicode 字符图标"换成统一组件与真实图标,为后续工业化打底。

- 依赖:装 lucide-react(描线图标,按需 tree-shake)
- 令牌:tailwind.config 加语义色 brand/accent/success/warn/danger + 圆角档位;
  强调色字面量(violet/cyan/emerald…)收敛到令牌,便于整体换肤
- primitives(src/ui,零重依赖自建):Button/Input/Textarea/Select/Field/Card/Panel/
  Badge/Dot/Tabs/Skeleton/EmptyState/Dialog/Toast(+useToast)/cn,桶文件统一引入
- 迁移:TopBar/LeftNav/BottomDrawer + Home/Report/Runs/Kb/Placeholder/ExecTrace/
  MemoryPanel/StudioView 全部换 primitives + lucide 图标;导航/能力卡/按钮告别
  ▤◆▣▦ 等 Unicode 字符;错误改用全局 Toast;空状态用 EmptyState
- App 包 ToastProvider

验证:tsc + vite build 通过;浏览器(Preview)走查工作台/报告页——真实图标、统一卡片/
按钮/输入;跑报告端到端正常(执行轨迹 lucide 状态图标点亮、章节耗时/字数/检索片段、
完成弹 Toast + 下载 Word)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Blizzard
2026-06-12 16:39:42 +08:00
parent 190c191ce4
commit 72bd43965f
25 changed files with 715 additions and 348 deletions
@@ -1,11 +1,19 @@
import { Hammer } from "lucide-react";
import { Badge } from "../ui";
// 规划中模块占位 —— 深色,露出信息架构与定位。
export function Placeholder({ title, desc }: { title: string; desc: string }) {
return (
<div className="flex h-full items-center justify-center p-8">
<div className="max-w-md rounded-xl border border-dashed border-line bg-ink-900 p-8 text-center">
<div className="max-w-md rounded-lg border border-dashed border-line bg-ink-900 p-8 text-center">
<div className="mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-xl border border-line bg-ink-850 text-slate-500">
<Hammer className="h-6 w-6" strokeWidth={1.5} />
</div>
<div className="mb-2 text-base font-medium text-slate-200">{title}</div>
<p className="text-sm leading-relaxed text-slate-500">{desc}</p>
<span className="mt-4 inline-block rounded-md bg-ink-800 px-2.5 py-1 text-[11px] text-slate-400"></span>
<div className="mt-4">
<Badge tone="warn"></Badge>
</div>
</div>
</div>
);