mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 02:42:25 +08:00
feat: completed input box ui + ux (#12927)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a document picker UI for embedding and selecting AFFiNE documents, with improved search and recent document functionality. - Added support for searching and fetching recently updated documents within a workspace. - Enhanced error handling for login and metadata validation during document operations. - Added ability to attach documents directly from the input box. - **Improvements** - Refined UI animations and layout behaviors for attachment and document picker components. - Updated attachment and header views for clearer pluralization and display logic. - Improved selection indicators and search experience in the document picker. - Enhanced delegate handling for user actions across input and attachment components. - **Bug Fixes** - Fixed progress indicators and error alerts for failed document operations. - **Chores** - Updated project configuration for improved build and signing processes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -13,10 +13,21 @@ extension AFFiNEViewController: IntelligentsButtonDelegate {
|
||||
IntelligentContext.shared.webView = webView!
|
||||
button.beginProgress()
|
||||
|
||||
IntelligentContext.shared.preparePresent() { _ in
|
||||
IntelligentContext.shared.preparePresent() { result in
|
||||
button.stopProgress()
|
||||
let controller = IntelligentsController()
|
||||
self.present(controller, animated: true)
|
||||
switch result {
|
||||
case .success(let success):
|
||||
let controller = IntelligentsController()
|
||||
self.present(controller, animated: true)
|
||||
case .failure(let failure):
|
||||
let alert = UIAlertController(
|
||||
title: "Error",
|
||||
message: failure.localizedDescription,
|
||||
preferredStyle: .alert
|
||||
)
|
||||
alert.addAction(UIAlertAction(title: "OK", style: .default))
|
||||
self.present(alert, animated: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user