diff --git a/AIStudyApp/AIStudyApp/Features/Library/LibraryHomeView.swift b/AIStudyApp/AIStudyApp/Features/Library/LibraryHomeView.swift index b622ede..69a96fa 100644 --- a/AIStudyApp/AIStudyApp/Features/Library/LibraryHomeView.swift +++ b/AIStudyApp/AIStudyApp/Features/Library/LibraryHomeView.swift @@ -18,12 +18,12 @@ struct LibraryHomeView: View { .overlay(RoundedRectangle(cornerRadius: 10).stroke(Color.zxBorder008, lineWidth: 1)) } .accessibilityLabel("搜索知识库") - NavigationLink(value: Route.libraryImport) { + NavigationLink(value: Route.libraryCreate) { Image(systemName: "plus").font(.system(size: 18)).foregroundColor(.white) .frame(width: 36, height: 36).background(ZXGradient.brand) .clipShape(RoundedRectangle(cornerRadius: 10)) } - .accessibilityLabel("导入新知识库") + .accessibilityLabel("创建新知识库") } .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("搜索知识库") } @@ -40,19 +40,11 @@ struct LibraryHomeView: View { } } 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 { 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) } .scrollIndicators(.hidden) .zxPullToRefresh { await viewModel.refresh() }