feat(ios): M2-04 测验入口(KB详情页 + 学习首页快捷操作)

- KB详情页 toolbar 新增 ? 测验按钮
- 学习首页新增快捷操作栏(AI问答/自测/复习)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
wangdl 2026-05-30 08:51:02 +08:00
parent bac51224e2
commit 850e38d1a4
2 changed files with 27 additions and 0 deletions

View File

@ -265,6 +265,11 @@ struct LibraryDetailPage: View {
Image(systemName: "trash").font(.system(size: 16)).foregroundColor(Color.zxF03) Image(systemName: "trash").font(.system(size: 16)).foregroundColor(Color.zxF03)
} }
} }
ToolbarItem(placement: .topBarTrailing) {
NavigationLink(value: Route.quizList(knowledgeBaseId: knowledgeBaseId)) {
Image(systemName: "questionmark.circle").font(.system(size: 16)).foregroundColor(Color.zxF05)
}
}
ToolbarItem(placement: .topBarTrailing) { ToolbarItem(placement: .topBarTrailing) {
NavigationLink(value: Route.addKnowledge(knowledgeBaseId: knowledgeBaseId)) { NavigationLink(value: Route.addKnowledge(knowledgeBaseId: knowledgeBaseId)) {
Image(systemName: "plus").font(.system(size: 16, weight: .semibold)).foregroundColor(Color.zxPrimary) Image(systemName: "plus").font(.system(size: 16, weight: .semibold)).foregroundColor(Color.zxPrimary)

View File

@ -51,6 +51,28 @@ struct StudyHomeView: View {
// MARK: - Weekly Summary // MARK: - Weekly Summary
weeklySummaryCard weeklySummaryCard
// MARK: - Quick Actions
HStack(spacing: 12) {
NavigationLink(value: Route.aiChat) {
VStack(spacing: 6) {
Image(systemName: "sparkles").font(.system(size: 18)).foregroundColor(Color.zxPurple).frame(width: 44, height: 44).background(Color.zxPurpleBG(0.12)).clipShape(RoundedRectangle(cornerRadius: 12))
Text("AI 问答").font(.system(size: 11)).foregroundColor(Color.zxF04)
}.frame(maxWidth: .infinity)
}.foregroundColor(.primary)
NavigationLink(value: Route.activeRecall) {
VStack(spacing: 6) {
Image(systemName: "brain.head.profile").font(.system(size: 18)).foregroundColor(Color.zxOrange).frame(width: 44, height: 44).background(Color.zxOrangeBG(0.12)).clipShape(RoundedRectangle(cornerRadius: 12))
Text("自测").font(.system(size: 11)).foregroundColor(Color.zxF04)
}.frame(maxWidth: .infinity)
}.foregroundColor(.primary)
NavigationLink(value: Route.reviewCard) {
VStack(spacing: 6) {
Image(systemName: "arrow.triangle.2.circlepath").font(.system(size: 18)).foregroundColor(Color.zxTeal).frame(width: 44, height: 44).background(Color.zxTeal.opacity(0.12)).clipShape(RoundedRectangle(cornerRadius: 12))
Text("复习").font(.system(size: 11)).foregroundColor(Color.zxF04)
}.frame(maxWidth: .infinity)
}.foregroundColor(.primary)
}.padding(.horizontal, 20)
// MARK: - Today Tasks // MARK: - Today Tasks
VStack(alignment: .leading, spacing: 12) { VStack(alignment: .leading, spacing: 12) {
HStack { HStack {