Repository navigation
feat: 登录页与操作审计页按效果图改版 - #34
Merged
Merged
Conversation
- 登录页:顶部深色品牌栏,左侧复用首页实验室横幅与三条卖点,右侧圆角登录卡片; 快速体验改为四张角色卡片(图标、说明、选中态),只保留系统真实具备的功能 - 审计页:首页同款横幅,表格列出时间、操作图标、中文角色标签、详情与对象、操作人; 支持按角色与操作类型筛选、分页,详情里的状态码显示为中文 - 后端 /api/audit-logs 新增 actorRole 筛选,集成测试覆盖与 action 组合 - 补齐支付、退款、对账等审计动作的中文名;角色图标与配色抽成 roleTag 共用 - 弹窗关闭按钮改用 Icon - 测试:扫描后端代码确认每个审计动作都有中文名;演示账号与种子数据一致; 筛选项不随当前行变化;翻页沿用已应用的筛选;慢响应不覆盖新页
CI 跑在 UTC,写死 +08:00 的时间会渲染成 01:05:07,本地东八区却能通过。 AGENTS.md 补充测试里构造时间的写法和 TZ=UTC 复查命令。
- .login-submit 与 .solid-button 同为单类选择器,后者写在后面,按源码顺序把登录按钮 压回 32px 高、12px 字号,禁用态也变成灰色;改为 .login-card .login-submit - 新增 tests/css-cascade.mjs:按优先级、!important 与源码顺序解析样式 (jsdom 的 getComputedStyle 不算优先级,测不出这类覆盖) - 测试断言登录按钮与审计筛选按钮的尺寸、登录中的禁用样式;改回单类选择器时失败 - AGENTS.md 前端约定补充通用按钮类的写法
This was referenced Oct 19, 2026
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.
登录页和操作审计页是最后两页还停留在旧风格的页面(深色网格背景、英文角色标签)。这次照 GPT 出的效果图改,但只做系统真实具备的功能。
登录页
操作审计页
后端
GET /api/audit-logs新增actorRole参数(大小写不敏感,SYSTEM筛自动任务)。BusinessOperationsIntegrationTest补了两条:按教师 + 「完成预约」查得到且全是教师;按学生 + 「完成预约」为 0 条顺手修的
components/roleTag.tsx,登录卡片和审计标签共用Icon(AGENTS.md 约定)review 修复
.login-submit和.solid-button都是单个类名,后者写在后面,按源码顺序把登录按钮压回 32px 高、12px 字号;登录中的禁用态也被换成灰色。改为.login-card .login-submitgetComputedStyle不算选择器优先级,原来的测试手段测不出这种覆盖,所以新增tests/css-cascade.mjs:按!important、优先级、源码顺序解析某个属性的最终值(自带一条自测)。用它断言登录按钮 56px / 17px / 10px 圆角、登录中保留自己的禁用样式、审计筛选按钮 40px;改回单类选择器时测试失败(已验证)cascadedValue防止跑偏的约束
tests/login-audit.test.mjs:auditLogService.record…写入的动作(含"WORK_ORDER_" + 状态这种拼接的),每个都必须在actionLabels里有中文名——以后后端加新动作忘了配中文,前端测试直接红DemoUserInitializer的种子数据一致.solid-button覆盖以上每条都做过破坏验证:删一个中文名、去掉序号比对、翻页改用未应用的筛选、改回单类选择器,对应测试都会失败。
验证
npm run lint、npm run typecheck、TZ=UTC npm test(82 项)全部通过+08:00的时间,CI 跑在 UTC 渲染成 01:05:07,本地东八区却能过。已改成按本地时间构造,AGENTS.md 补了一句写法和TZ=UTC npm test复查命令截图
假后端上的截图(审计数据照真实服务写入的格式造的),README 截图没有替换,需要在真后端上重拍登录页和审计页(01、06)。