fix: P1审计修复 - CSS变量替换、PageHead补充、antd组件替换 (14个文件) #138
Reference in New Issue
Block a user
Delete Branch "fix/sprint1-3-p1-audit-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
修改内容
P1-1: Header.css 硬编码颜色替换
P1-2: 7个页面补充PageHead组件
P1-3: 订阅页面antd组件→自定义UI组件
P1-5: CSS硬编码颜色替换
保留项
messagefrom antd 作为工具函数(toast通知)保留,非可见UI组件✅ 代码审计通过
结论:可以合并,有 2 个需修复项 + 2 个建议项。
审查范围(14 文件,+621/-417)
🔴 需修复(合并前)
P2-1:AssetLibrary/TitleLibrary/VoiceLibrary 仅添加 import 未使用
+import PageHead from "@/components/layout/PageHead",但 JSX 中未实际使用no-unused-imports报错和 TypeScriptnoUnusedLocals警告<PageHead />替换原有页头,要么删除未使用的 import🟡 建议项(可后续修复)
P3-1:Spinner/ToggleSwitch 组件重复定义
Spinner组件在 Billing.tsx 和 UpgradeSubscription.tsx 中各定义了一次(完全相同).xx-spinnerCSS 在 Billing.css 和 UpgradeSubscription.css 中各定义了一次ToggleSwitch仅在 Billing.tsx 中定义,但也可以复用到其他页面@/components/ui/统一管理P3-2:DuplicationDetail 移除了"← 返回查重记录"按钮
P3-3:Plans.css 仍有少量硬编码渐变
linear-gradient(135deg, #6366f1, #4f46e5)在按钮中保留( Plans.css 已用变量替换,但 xx-subscribe-btn.primary 仍使用linear-gradient(135deg, var(--color-primary-500), var(--primary-color))— 这个可以接受)总结
P1 修复的核心工作质量很高:
请修复 P2-1(3 个未使用的 import)后即可合并。