mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: support align and upgrade appflowy_editor (#2712)
* feat: support align and upgrade appflowy_editor * chore: try to fix linux analyze error * fix: error after inserting callout block * feat: add inline board / grid plugin * feat: refactor insert_page * fix: ref view in document * chore: add asset name and description to option align type * fix: linux flutter analyze * chore: disable file export and log * fix: the window always back to center after relaunching * fix: potential data lost in nested list * feat: re-design login page * fix: can't remove background color * chore: rename bundle id and change the macos app to non sandbox app --------- Co-authored-by: nathan <nathan@appflowy.io>
This commit is contained in:
@ -84,6 +84,7 @@ impl DatabaseManager2 {
|
||||
self.get_database(&database_id).await
|
||||
}
|
||||
|
||||
#[tracing::instrument(level = "debug", skip(self), err)]
|
||||
pub async fn get_database_id_with_view_id(&self, view_id: &str) -> FlowyResult<String> {
|
||||
let database_id = self.with_user_database(Err(FlowyError::internal()), |database| {
|
||||
database
|
||||
@ -98,6 +99,7 @@ impl DatabaseManager2 {
|
||||
return Ok(editor.clone());
|
||||
}
|
||||
|
||||
tracing::trace!("create new editor for database {}", database_id);
|
||||
let mut editors = self.editors.write().await;
|
||||
let database = MutexDatabase::new(self.with_user_database(
|
||||
Err(FlowyError::record_not_found()),
|
||||
@ -178,6 +180,7 @@ impl DatabaseManager2 {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tracing::instrument(level = "trace", skip(self), err)]
|
||||
pub async fn create_linked_view(
|
||||
&self,
|
||||
name: String,
|
||||
@ -188,11 +191,8 @@ impl DatabaseManager2 {
|
||||
self.with_user_database(
|
||||
Err(FlowyError::internal().context("Create database view failed")),
|
||||
|user_database| {
|
||||
let database = user_database
|
||||
.get_database(&database_id)
|
||||
.ok_or_else(FlowyError::record_not_found)?;
|
||||
let params = CreateViewParams::new(database_id, database_view_id, name, layout.into());
|
||||
database.create_linked_view(params)?;
|
||||
user_database.create_database_linked_view(params)?;
|
||||
Ok(())
|
||||
},
|
||||
)?;
|
||||
|
Reference in New Issue
Block a user