From 9d0f426118b24dbaa61d414c262b20b509a6eaab Mon Sep 17 00:00:00 2001 From: wangdl Date: Sat, 6 Jun 2026 18:15:51 +0800 Subject: [PATCH] =?UTF-8?q?revert:=20=E6=81=A2=E5=A4=8D=20AddKnowledgePage?= =?UTF-8?q?=20=E6=A0=87=E7=AD=BE=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- .../Features/Library/LibrarySubpages.swift | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/AIStudyApp/AIStudyApp/Features/Library/LibrarySubpages.swift b/AIStudyApp/AIStudyApp/Features/Library/LibrarySubpages.swift index 25c9e56..c233039 100644 --- a/AIStudyApp/AIStudyApp/Features/Library/LibrarySubpages.swift +++ b/AIStudyApp/AIStudyApp/Features/Library/LibrarySubpages.swift @@ -643,7 +643,7 @@ struct AddKnowledgePage: View { ScrollView { VStack(spacing: 16) { // 内容来源选择 VStack(alignment: .leading, spacing: 8) { - Text("内容来源").font(.system(size: 15, weight: .semibold)).foregroundColor(Color.zxF035) + Text("内容来源").font(.system(size: 12, weight: .semibold)).foregroundColor(Color.zxF035) Picker("", selection: $sourceType) { ForEach(SourceType.allCases, id: \.self) { t in Text(t.rawValue).tag(t) } } @@ -654,14 +654,14 @@ struct AddKnowledgePage: View { switch sourceType { case .manual: VStack(alignment: .leading, spacing: 8) { - Text("标题").font(.system(size: 15, weight: .semibold)).foregroundColor(Color.zxF035) + Text("标题").font(.system(size: 12, weight: .semibold)).foregroundColor(Color.zxF035) TextField("输入知识点标题", text: $title).font(.system(size: 16)).tint(Color.zxPurple) .padding(.horizontal, 16).frame(height: 52) .background(Color.zxFill004).clipShape(RoundedRectangle(cornerRadius: 14)) .overlay(RoundedRectangle(cornerRadius: 14).stroke(Color.zxBorder008, lineWidth: 1)) } VStack(alignment: .leading, spacing: 8) { - Text("内容").font(.system(size: 15, weight: .semibold)).foregroundColor(Color.zxF035) + Text("内容").font(.system(size: 12, weight: .semibold)).foregroundColor(Color.zxF035) TextEditor(text: $content) .frame(minHeight: 200).scrollContentBackground(.hidden).padding(12) .background(Color.zxFill004).clipShape(RoundedRectangle(cornerRadius: 14)) @@ -701,8 +701,7 @@ struct AddKnowledgePage: View { ForEach(selectedFiles) { f in HStack(spacing: 8) { Image(systemName: f.icon).foregroundColor(Color.zxGreen) - Text(f.name).font(.system(size: 15)).foregroundColor(Color.zxF0).lineLimit(1) - .onTapGesture { UIPasteboard.general.string = f.name } + Text(f.name).font(.system(size: 14)).foregroundColor(Color.zxF0).lineLimit(1) Spacer() Text(f.size).font(.system(size: 12)).foregroundColor(Color.zxF04) Button { @@ -722,7 +721,7 @@ struct AddKnowledgePage: View { Image(systemName: "info.circle").font(.system(size: 12)) Text("支持多选,每个文件生成一个知识点") } - .font(.system(size: 13)).foregroundColor(Color.zxF04) + .font(.system(size: 12)).foregroundColor(Color.zxF04) } if isUploading { @@ -1363,8 +1362,8 @@ struct EditKnowledgePage: View { var body: some View { ZStack { Color.zxBg0.ignoresSafeArea(); VStack(spacing: 0) { ScrollView { VStack(spacing: 16) { - VStack(alignment: .leading, spacing: 8) { Text("标题").font(.system(size: 15, weight: .semibold)).foregroundColor(Color.zxF035); TextField("", text: $title).font(.system(size: 16)).tint(Color.zxPurple).padding(.horizontal, 16).frame(height: 52).background(Color.zxFill004).clipShape(RoundedRectangle(cornerRadius: 14)).overlay(RoundedRectangle(cornerRadius: 14).stroke(Color.zxBorder008, lineWidth: 1)) } - VStack(alignment: .leading, spacing: 8) { Text("内容").font(.system(size: 15, weight: .semibold)).foregroundColor(Color.zxF035); TextEditor(text: $content).frame(minHeight: 200).scrollContentBackground(.hidden).padding(12).background(Color.zxFill004).clipShape(RoundedRectangle(cornerRadius: 14)).overlay(RoundedRectangle(cornerRadius: 14).stroke(Color.zxBorder008, lineWidth: 1)) } + VStack(alignment: .leading, spacing: 8) { Text("标题").font(.system(size: 12, weight: .semibold)).foregroundColor(Color.zxF035); TextField("", text: $title).font(.system(size: 16)).tint(Color.zxPurple).padding(.horizontal, 16).frame(height: 52).background(Color.zxFill004).clipShape(RoundedRectangle(cornerRadius: 14)).overlay(RoundedRectangle(cornerRadius: 14).stroke(Color.zxBorder008, lineWidth: 1)) } + VStack(alignment: .leading, spacing: 8) { Text("内容").font(.system(size: 12, weight: .semibold)).foregroundColor(Color.zxF035); TextEditor(text: $content).frame(minHeight: 200).scrollContentBackground(.hidden).padding(12).background(Color.zxFill004).clipShape(RoundedRectangle(cornerRadius: 14)).overlay(RoundedRectangle(cornerRadius: 14).stroke(Color.zxBorder008, lineWidth: 1)) } Button { Task { _ = try? await KnowledgeItemService.shared.update(id: item.id, title: title, content: content, summary: nil) } } label: { Text("保存修改").font(.system(size: 14, weight: .bold)).foregroundColor(.white).frame(maxWidth: .infinity).frame(height: 52).background(ZXGradient.ctaPurple).clipShape(RoundedRectangle(cornerRadius: 16)) }