Repository navigation
feat(ui): P0 设计层打底——主题 token、暗色覆盖与全局活动中心骨架(任务书 Part B) - #88
Merged
Merged
Conversation
- 新增:styles/tokens.css 双主题设计 token(B.3.2 青碧色板 + 圆角/单层浮层阴影/系统中文字体栈/密度/动效变量),卡片无阴影用边框分层 - 新增:utils/theme.js 外观偏好机制,localStorage 键 mm-appearance 存 theme/density/motion,默认跟随系统并监听系统切换;index.ejs 首屏内联脚本防闪烁 - 新增:styles/element-dark-overrides.css 集中覆盖 el-table/el-dialog/el-select-dropdown/el-message-box/el-input/el-date-picker/el-popover/el-drawer/el-tag 等,暗色下无裸露 element-ui 默认蓝白底 - 新增:顶栏右侧主题三态循环按钮(light→dark→system,图标区分 + tooltip)与全局活动中心入口(计数徽章 0 时隐藏、执行中迷你进度、分组抽屉点击跳视频管理) - 新增:主进程 activityEvents 事件总线,发布任务开始/完成(含失败/草稿未核验/需重新登录)向主窗口推送 activity:event 并保留最近 50 条缓冲 - 调整:publishVideo.js/puppeteerFile.js 仅新增事件上报与 recordId 透传,不改变任何任务行为、回执内容与退出码 - 新增:store/activity + utils/activityCenter 纯函数化分组排序与计数(需人工处理 > 执行中 > 已完成,同 recordId/taskId 去重更新) - 测试:新增 scripts/test-theme-tokens.js 与 test-activity-center.js 并登记 scripts/tests.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
任务书
docs/roadmap-capability-ui.mdPart B P0:视觉 token + 主题机制 + 全局活动中心骨架。硬性约束已遵守:顶栏为主导航结构不动,全部只做加法。内容
主题系统
styles/tokens.css:青碧色板双主题 CSS 变量(B.3.2)+ 圆角/阴影/字体变量(卡片无阴影用边框,视觉避让清单合规)utils/theme.js:mm-appearance偏好(theme/density/motion),默认跟随系统(matchMedia 监听),纯函数resolveTheme可测index.ejshead 内联首屏前同步脚本,防主题闪烁styles/element-dark-overrides.css(730 行):element-ui 深色集中覆盖(表格/弹窗/下拉/日期面板/抽屉/tag/badge 等 30+ 组件,弹层挂 body 的已用 data-theme 选择器覆盖)全局活动中心(骨架)
activityEvents.js:事件总线(activity:event推送 + 最近 50 条缓冲 +activity:recent幂等拉取)publishVideo.js:定时任务创建 / 记录创建 started /updateRecord状态迁移上报;recordId透传 taskPayload 用于去重对齐puppeteerFile.js:任务真正执行时 started(排队期不虚报);transport 包装在终态回执(done/noLogin)透传前上报,状态映射复用resolvePublishCompletion;登录巡检等内部任务(pt 带「状态/登录」)不进活动中心utils/activityCenter.js纯逻辑(分组/排序/计数/去重)+ pinia store + Navbar 铃铛(徽章 0 隐藏、执行中迷你进度)+ el-drawer 分组抽屉(需人工处理[failed/draft_unverified/login_required/abnormal] 置顶,点击跳 /video-manager)测试
theme-tokens、activity-center(已登记scripts/tests.json),全绿npm run build:dir通过node e2e/run.js -p dy --yes→draftVerified=true退出码 0。MM-E2E-20261204-231554-dy草稿一条,合并前请清理走查建议(合并后人工看)
遗留
dark-mode.scssmedia query 被 token 选择器压制,P1 可删LocalVideoPublish.vue:2125-2130定时记录对象有重复键(group/accountName/accountKey 写了两遍,无运行影响)