feat(parent-portal): 完整实现 P4+P5+P6 家长端微前端
实现内容(仲裁裁决驱动,首次即最终方案): P4 核心功能 - 认证:localStorage token 存储(F12)+ REST 登录(ISSUE-004)+ refreshAccessToken 竞态防护 - 子女切换:ChildSwitcher(Tab ≤3 / 下拉 ≥4)+ Zustand store(ISSUE-009 纯前端切换) - 数据查询:urql GraphQL 消费 parent-bff(F9)+ TanStack Query 缓存 - 通知中心:NotificationFeed + 已读/全部已读 mutations - 通知偏好:三维矩阵 + ISSUE-033 localStorage 降级 - 5 层状态管理:URL/Server/Client/Global UI/Form - 跨标签同步:BroadcastChannel + storage 事件 P5 实时推送 - WebSocket 连接 push-gateway + 指数退避重连 - HTTP 轮询降级(60s)+ 实时通知 Hook P6 硬化 - Web Vitals 上报 + OTel trace - i18n 5 语言(zh-CN/en-US/zh-TW/ja-JP/ar-SA 含 RTL) - PWA manifest + Service Worker - CSP 安全头 + 权限点 F7 命名 + 设计令牌三层 测试与构建 - Vitest 92 测试全通过(utils/auth/child-store/ChildSwitcher/NotificationFeed/login) - MSW mock 未就绪上游(parent-bff GraphQL + iam REST + iam GetChildrenByParent P0 阻塞用 fixtures) - Dockerfile 多阶段构建(G1,端口 4002,HEALTHCHECK /api/health) - typecheck + lint 零错误 经验沉淀 - known-issues.md §2.13 追加 12 条实现期经验(无 AI 身份标注) - arch.db 已更新(15 TS 模块 / 482 符号 / 138 proto) 依据:02-architecture-design.md(回写总裁裁决)、coord-final-decisions.md、 president-final-rulings.md、parent-portal_workline.md、parent-portal_contract.md
This commit is contained in:
62
apps/parent-portal/tailwind.config.js
Normal file
62
apps/parent-portal/tailwind.config.js
Normal file
@@ -0,0 +1,62 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
// parent-portal Tailwind 配置
|
||||
// 复用 teacher-portal 设计令牌(与 Shell 共享)
|
||||
// 依据:02-architecture-design.md §9 设计令牌三层(复用 packages/ui-tokens)
|
||||
// project_rules §3.10 设计令牌规范(禁止 #hex / 禁止硬编码字体 / 禁止任意值)
|
||||
|
||||
module.exports = {
|
||||
content: ["./src/**/*.{js,ts,jsx,tsx}"],
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
paper: "hsl(var(--paper))",
|
||||
ink: {
|
||||
DEFAULT: "hsl(var(--ink))",
|
||||
muted: "hsl(var(--ink-muted))",
|
||||
},
|
||||
accent: {
|
||||
DEFAULT: "hsl(var(--accent))",
|
||||
soft: "hsl(var(--accent-soft))",
|
||||
},
|
||||
rule: "hsl(var(--rule))",
|
||||
success: "hsl(var(--success))",
|
||||
warning: "hsl(var(--warning))",
|
||||
danger: "hsl(var(--danger))",
|
||||
},
|
||||
fontFamily: {
|
||||
serif: ["var(--font-serif)"],
|
||||
sans: ["var(--font-sans)"],
|
||||
mono: ["var(--font-mono)"],
|
||||
},
|
||||
fontSize: {
|
||||
xs: ["var(--font-size-1)", "var(--line-height-tight)"],
|
||||
sm: ["var(--font-size-2)", "var(--line-height-normal)"],
|
||||
base: ["var(--font-size-3)", "var(--line-height-normal)"],
|
||||
lg: ["var(--font-size-4)", "var(--line-height-normal)"],
|
||||
xl: ["var(--font-size-5)", "var(--line-height-tight)"],
|
||||
"2xl": ["var(--font-size-6)", "var(--line-height-tight)"],
|
||||
"3xl": ["var(--font-size-7)", "var(--line-height-tight)"],
|
||||
},
|
||||
spacing: {
|
||||
1: "var(--space-1)",
|
||||
2: "var(--space-2)",
|
||||
3: "var(--space-3)",
|
||||
4: "var(--space-4)",
|
||||
5: "var(--space-5)",
|
||||
6: "var(--space-6)",
|
||||
8: "var(--space-8)",
|
||||
10: "var(--space-10)",
|
||||
12: "var(--space-12)",
|
||||
16: "var(--space-16)",
|
||||
},
|
||||
borderRadius: {
|
||||
DEFAULT: "var(--radius-md)",
|
||||
sm: "var(--radius-sm)",
|
||||
md: "var(--radius-md)",
|
||||
lg: "var(--radius-lg)",
|
||||
full: "9999px",
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [],
|
||||
};
|
||||
Reference in New Issue
Block a user