fix(ios): 知识库页面优化 - 去掉中间创建按钮,右上角+改为创建
- 移除列表中部的虚线"创建新知识库"按钮 - 右上角+按钮从 libraryImport 改为 libraryCreate - 空状态提示更新 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
e4132dd1c3
commit
9aa9fd76c7
@ -18,12 +18,12 @@ struct LibraryHomeView: View {
|
|||||||
.overlay(RoundedRectangle(cornerRadius: 10).stroke(Color.zxBorder008, lineWidth: 1))
|
.overlay(RoundedRectangle(cornerRadius: 10).stroke(Color.zxBorder008, lineWidth: 1))
|
||||||
}
|
}
|
||||||
.accessibilityLabel("搜索知识库")
|
.accessibilityLabel("搜索知识库")
|
||||||
NavigationLink(value: Route.libraryImport) {
|
NavigationLink(value: Route.libraryCreate) {
|
||||||
Image(systemName: "plus").font(.system(size: 18)).foregroundColor(.white)
|
Image(systemName: "plus").font(.system(size: 18)).foregroundColor(.white)
|
||||||
.frame(width: 36, height: 36).background(ZXGradient.brand)
|
.frame(width: 36, height: 36).background(ZXGradient.brand)
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 10))
|
.clipShape(RoundedRectangle(cornerRadius: 10))
|
||||||
}
|
}
|
||||||
.accessibilityLabel("导入新知识库")
|
.accessibilityLabel("创建新知识库")
|
||||||
}
|
}
|
||||||
.padding(.horizontal, 20).padding(.top, 8).padding(.bottom, 12)
|
.padding(.horizontal, 20).padding(.top, 8).padding(.bottom, 12)
|
||||||
HStack(spacing: 8) { Image(systemName: "magnifyingglass").font(.system(size: 16)).foregroundColor(Color.zxF03); TextField("搜索知识库或知识点…", text: $s).font(.system(size: 14)).tint(Color.zxPurple).accessibilityLabel("搜索知识库") }
|
HStack(spacing: 8) { Image(systemName: "magnifyingglass").font(.system(size: 16)).foregroundColor(Color.zxF03); TextField("搜索知识库或知识点…", text: $s).font(.system(size: 14)).tint(Color.zxPurple).accessibilityLabel("搜索知识库") }
|
||||||
@ -40,19 +40,11 @@ struct LibraryHomeView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if viewModel.knowledgeBases.isEmpty && !viewModel.isLoading {
|
if viewModel.knowledgeBases.isEmpty && !viewModel.isLoading {
|
||||||
Text("还没有知识库,点击右上角 + 创建").font(.system(size: 13)).foregroundColor(Color.zxF03).padding(.top, 40)
|
Text("还没有知识库,点击右上角 + 创建").font(.system(size: 14)).foregroundColor(Color.zxF04).padding(.top, 60)
|
||||||
}
|
}
|
||||||
if viewModel.hasMore {
|
if viewModel.hasMore {
|
||||||
ZXLoadMoreFooter { await viewModel.loadMore() }
|
ZXLoadMoreFooter { await viewModel.loadMore() }
|
||||||
}
|
}
|
||||||
NavigationLink(value: Route.libraryCreate) {
|
|
||||||
HStack(spacing: 8) { Image(systemName: "plus").font(.system(size: 16)); Text("创建新知识库").font(.system(size: 14, weight: .semibold)) }
|
|
||||||
.foregroundColor(Color.zxF05).frame(maxWidth: .infinity).frame(height: 52).background(Color.zxFill003)
|
|
||||||
.overlay(RoundedRectangle(cornerRadius: 16).strokeBorder(style: StrokeStyle(lineWidth: 1.5, dash: [6, 4]), antialiased: true).foregroundColor(Color.zxBorder01))
|
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 16))
|
|
||||||
}
|
|
||||||
.accessibilityLabel("创建新知识库")
|
|
||||||
.accessibilityHint("导入文档或文本生成结构化知识库")
|
|
||||||
}.padding(.horizontal, 20).padding(.bottom, 120) }
|
}.padding(.horizontal, 20).padding(.bottom, 120) }
|
||||||
.scrollIndicators(.hidden)
|
.scrollIndicators(.hidden)
|
||||||
.zxPullToRefresh { await viewModel.refresh() }
|
.zxPullToRefresh { await viewModel.refresh() }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user