fix: AddKnowledgePage 标签放大 + 文件名点击复制
- 标签字号 12→15 (内容来源/标题/内容) - 文件列表项点击文件名复制到剪贴板 - 提示文字 12→13 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
1bbcf0acfb
commit
d8bdfe1dd4
@ -643,7 +643,7 @@ struct AddKnowledgePage: View {
|
||||
ScrollView { VStack(spacing: 16) {
|
||||
// 内容来源选择
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text("内容来源").font(.system(size: 12, weight: .semibold)).foregroundColor(Color.zxF035)
|
||||
Text("内容来源").font(.system(size: 15, 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: 12, weight: .semibold)).foregroundColor(Color.zxF035)
|
||||
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: 12, weight: .semibold)).foregroundColor(Color.zxF035)
|
||||
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))
|
||||
@ -701,7 +701,8 @@ struct AddKnowledgePage: View {
|
||||
ForEach(selectedFiles) { f in
|
||||
HStack(spacing: 8) {
|
||||
Image(systemName: f.icon).foregroundColor(Color.zxGreen)
|
||||
Text(f.name).font(.system(size: 14)).foregroundColor(Color.zxF0).lineLimit(1)
|
||||
Text(f.name).font(.system(size: 15)).foregroundColor(Color.zxF0).lineLimit(1)
|
||||
.onTapGesture { UIPasteboard.general.string = f.name }
|
||||
Spacer()
|
||||
Text(f.size).font(.system(size: 12)).foregroundColor(Color.zxF04)
|
||||
Button {
|
||||
@ -721,7 +722,7 @@ struct AddKnowledgePage: View {
|
||||
Image(systemName: "info.circle").font(.system(size: 12))
|
||||
Text("支持多选,每个文件生成一个知识点")
|
||||
}
|
||||
.font(.system(size: 12)).foregroundColor(Color.zxF04)
|
||||
.font(.system(size: 13)).foregroundColor(Color.zxF04)
|
||||
}
|
||||
|
||||
if isUploading {
|
||||
@ -1362,8 +1363,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: 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)) }
|
||||
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)) }
|
||||
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)) }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user