From 850e38d1a4e6f2a9a500f25ec5d8fdefb3eda932 Mon Sep 17 00:00:00 2001 From: wangdl Date: Sat, 30 May 2026 08:51:02 +0800 Subject: [PATCH] =?UTF-8?q?feat(ios):=20M2-04=20=E6=B5=8B=E9=AA=8C?= =?UTF-8?q?=E5=85=A5=E5=8F=A3=EF=BC=88KB=E8=AF=A6=E6=83=85=E9=A1=B5=20+=20?= =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E9=A6=96=E9=A1=B5=E5=BF=AB=E6=8D=B7=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - KB详情页 toolbar 新增 ? 测验按钮 - 学习首页新增快捷操作栏(AI问答/自测/复习) Co-Authored-By: Claude Opus 4.7 --- .../Features/Library/LibrarySubpages.swift | 5 +++++ .../Features/Study/StudyHomeView.swift | 22 +++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/AIStudyApp/AIStudyApp/Features/Library/LibrarySubpages.swift b/AIStudyApp/AIStudyApp/Features/Library/LibrarySubpages.swift index 41a8cee..eca540c 100644 --- a/AIStudyApp/AIStudyApp/Features/Library/LibrarySubpages.swift +++ b/AIStudyApp/AIStudyApp/Features/Library/LibrarySubpages.swift @@ -265,6 +265,11 @@ struct LibraryDetailPage: View { 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) { NavigationLink(value: Route.addKnowledge(knowledgeBaseId: knowledgeBaseId)) { Image(systemName: "plus").font(.system(size: 16, weight: .semibold)).foregroundColor(Color.zxPrimary) diff --git a/AIStudyApp/AIStudyApp/Features/Study/StudyHomeView.swift b/AIStudyApp/AIStudyApp/Features/Study/StudyHomeView.swift index 007fdfe..603baa0 100644 --- a/AIStudyApp/AIStudyApp/Features/Study/StudyHomeView.swift +++ b/AIStudyApp/AIStudyApp/Features/Study/StudyHomeView.swift @@ -51,6 +51,28 @@ struct StudyHomeView: View { // MARK: - Weekly Summary 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 VStack(alignment: .leading, spacing: 12) { HStack {