- 架构层:ViewModel/ObservableObject、Service/Repository、网络层 APIClient/APIEndpoint/APIError - 设计系统:Color(light:dark:) 自适应 28 色 Token、ColorSchemeManager 深浅色切换 - 全页面:AI 对话/反馈/回忆/薄弱点、知识库 CRUD、学习工作台、复习计划、学习分析、个人中心/设置 - 登录与引导:Sign in with Apple、AppSession 状态管理、引导流程、演示模式 - 本地持久化:FileCache + PersistenceController(学习任务/复习任务/学习记录) - 本地化:zh-Hans Localizable.strings ~120 条、ZXStrings 程序化引用、LanguageManager - 组件库:ZXTabBar/ZXBackHeader/ZXSTaskRow/ZXChartView/ZXTypingIndicator 等 22 个共享组件 - 等待名单:WaitlistView 邮箱收集表单 - 动效:ZXTypingIndicator AI 打字动画、ZXShimmerModifier 骨架屏 - 测试:StudyHomeViewModel/AIChatViewModel/ReviewPlanViewModel/FileCache 共 28 条 - Dynamic Type 支持 + 范围限制 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
28 lines
1.4 KiB
Swift
28 lines
1.4 KiB
Swift
import SwiftUI
|
|
|
|
// MARK: - Weak Point Row
|
|
|
|
struct ZXWeakRow: View {
|
|
let score: Int; let topic: String; let lib: String; let priority: String
|
|
var body: some View {
|
|
HStack(spacing: 12) {
|
|
Text("\(score)").font(.system(size: 13, weight: .heavy)).foregroundColor(Color.zxYellow)
|
|
.frame(width: 40, height: 40)
|
|
.background(Color.zxYellowBG(0.15)).clipShape(RoundedRectangle(cornerRadius: 12))
|
|
VStack(alignment: .leading, spacing: 2) {
|
|
Text(topic).font(.system(size: 13, weight: .semibold)).foregroundColor(Color.zxF0)
|
|
Text(lib).font(.system(size: 11)).foregroundColor(Color.zxF04)
|
|
}.frame(maxWidth: .infinity, alignment: .leading)
|
|
Text("\(priority)优先").font(.system(size: 11, weight: .bold))
|
|
.foregroundColor(priority == "高" ? Color.zxRed : Color.zxYellow)
|
|
.padding(.horizontal, 8).padding(.vertical, 3)
|
|
.background((priority == "高" ? Color.zxRedBG(0.15) : Color.zxYellowBG(0.15)))
|
|
.clipShape(Capsule())
|
|
}
|
|
.padding(.horizontal, 16).padding(.vertical, 12)
|
|
.background(Color.zxYellowBG(0.06))
|
|
.overlay(RoundedRectangle(cornerRadius: 14).stroke(Color(hex: "#F59E0B", opacity: 0.15), lineWidth: 1))
|
|
.clipShape(RoundedRectangle(cornerRadius: 14))
|
|
}
|
|
}
|