diff --git a/frontend/appflowy_flutter/lib/plugins/database/widgets/field/field_editor.dart b/frontend/appflowy_flutter/lib/plugins/database/widgets/field/field_editor.dart index e417ca2d8f..445966afe8 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/widgets/field/field_editor.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/widgets/field/field_editor.dart @@ -286,7 +286,7 @@ enum FieldAction { case FieldAction.delete: return LocaleKeys.grid_field_delete.tr(); case FieldAction.wrap: - return LocaleKeys.grid_field_wrap.tr(); + return LocaleKeys.grid_field_wrapCellContent.tr(); } } diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.lock b/frontend/appflowy_tauri/src-tauri/Cargo.lock index 2bb59e0e64..814b6a86ce 100644 --- a/frontend/appflowy_tauri/src-tauri/Cargo.lock +++ b/frontend/appflowy_tauri/src-tauri/Cargo.lock @@ -859,7 +859,7 @@ dependencies = [ [[package]] name = "collab" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "async-trait", @@ -883,7 +883,7 @@ dependencies = [ [[package]] name = "collab-database" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "async-trait", @@ -913,7 +913,7 @@ dependencies = [ [[package]] name = "collab-document" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "collab", @@ -932,7 +932,7 @@ dependencies = [ [[package]] name = "collab-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "bytes", @@ -947,7 +947,7 @@ dependencies = [ [[package]] name = "collab-folder" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "chrono", @@ -985,7 +985,7 @@ dependencies = [ [[package]] name = "collab-plugins" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "async-stream", @@ -1063,7 +1063,7 @@ dependencies = [ [[package]] name = "collab-user" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "collab", diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.toml b/frontend/appflowy_tauri/src-tauri/Cargo.toml index cd62406cb4..dcab388d01 100644 --- a/frontend/appflowy_tauri/src-tauri/Cargo.toml +++ b/frontend/appflowy_tauri/src-tauri/Cargo.toml @@ -98,10 +98,10 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "390 # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } +collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } diff --git a/frontend/appflowy_web/wasm-libs/Cargo.toml b/frontend/appflowy_web/wasm-libs/Cargo.toml index 362f6ab47c..86497f2df6 100644 --- a/frontend/appflowy_web/wasm-libs/Cargo.toml +++ b/frontend/appflowy_web/wasm-libs/Cargo.toml @@ -65,10 +65,10 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "390 # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } +collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.lock b/frontend/appflowy_web_app/src-tauri/Cargo.lock index a042982e59..6ee41e8a7b 100644 --- a/frontend/appflowy_web_app/src-tauri/Cargo.lock +++ b/frontend/appflowy_web_app/src-tauri/Cargo.lock @@ -842,7 +842,7 @@ dependencies = [ [[package]] name = "collab" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "async-trait", @@ -866,7 +866,7 @@ dependencies = [ [[package]] name = "collab-database" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "async-trait", @@ -896,7 +896,7 @@ dependencies = [ [[package]] name = "collab-document" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "collab", @@ -915,7 +915,7 @@ dependencies = [ [[package]] name = "collab-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "bytes", @@ -930,7 +930,7 @@ dependencies = [ [[package]] name = "collab-folder" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "chrono", @@ -968,7 +968,7 @@ dependencies = [ [[package]] name = "collab-plugins" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "async-stream", @@ -1046,7 +1046,7 @@ dependencies = [ [[package]] name = "collab-user" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "collab", diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.toml b/frontend/appflowy_web_app/src-tauri/Cargo.toml index 13e93a4edb..b0575358d2 100644 --- a/frontend/appflowy_web_app/src-tauri/Cargo.toml +++ b/frontend/appflowy_web_app/src-tauri/Cargo.toml @@ -97,10 +97,10 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "390 # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } +collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } diff --git a/frontend/resources/translations/en.json b/frontend/resources/translations/en.json index d27ac5c99c..f2d94aa5d8 100644 --- a/frontend/resources/translations/en.json +++ b/frontend/resources/translations/en.json @@ -654,7 +654,7 @@ "insertRight": "Insert Right", "duplicate": "Duplicate", "delete": "Delete", - "wrap": "Wrap", + "wrapCellContent": "Wrap text", "clear": "Clear cells", "textFieldName": "Text", "checkboxFieldName": "Checkbox", @@ -1476,4 +1476,4 @@ "betaTooltip": "We currently only support searching for pages", "fromTrashHint": "From trash" } -} +} \ No newline at end of file diff --git a/frontend/rust-lib/Cargo.lock b/frontend/rust-lib/Cargo.lock index 8f899fa0db..74decab098 100644 --- a/frontend/rust-lib/Cargo.lock +++ b/frontend/rust-lib/Cargo.lock @@ -784,7 +784,7 @@ dependencies = [ [[package]] name = "collab" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "async-trait", @@ -808,7 +808,7 @@ dependencies = [ [[package]] name = "collab-database" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "async-trait", @@ -838,7 +838,7 @@ dependencies = [ [[package]] name = "collab-document" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "collab", @@ -857,7 +857,7 @@ dependencies = [ [[package]] name = "collab-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "bytes", @@ -872,7 +872,7 @@ dependencies = [ [[package]] name = "collab-folder" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "chrono", @@ -910,7 +910,7 @@ dependencies = [ [[package]] name = "collab-plugins" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "async-stream", @@ -988,7 +988,7 @@ dependencies = [ [[package]] name = "collab-user" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f1ef8ef3c179a7340d91ad6e5e176cc980accb9c#f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5e32057ac8e6939368a8e75df91bcbce2ac143e7#5e32057ac8e6939368a8e75df91bcbce2ac143e7" dependencies = [ "anyhow", "collab", diff --git a/frontend/rust-lib/Cargo.toml b/frontend/rust-lib/Cargo.toml index ee8f55ef2e..47722c1864 100644 --- a/frontend/rust-lib/Cargo.toml +++ b/frontend/rust-lib/Cargo.toml @@ -125,10 +125,10 @@ client-api = { git = " https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "39 # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } -collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" } +collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } +collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" } diff --git a/frontend/rust-lib/flowy-database2/src/manager.rs b/frontend/rust-lib/flowy-database2/src/manager.rs index 4bbc6e5848..13b4a1007c 100644 --- a/frontend/rust-lib/flowy-database2/src/manager.rs +++ b/frontend/rust-lib/flowy-database2/src/manager.rs @@ -282,7 +282,7 @@ impl DatabaseManager { pub async fn duplicate_database(&self, view_id: &str) -> FlowyResult> { let wdb = self.get_workspace_database().await?; - let data = wdb.get_database_duplicated_data(view_id).await?; + let data = wdb.get_database_data(view_id).await?; let json_bytes = data.to_json_bytes()?; Ok(json_bytes) } @@ -294,11 +294,22 @@ impl DatabaseManager { view_id: &str, data: Vec, ) -> FlowyResult<()> { - let mut database_data = DatabaseData::from_json_bytes(data)?; - database_data.view.id = view_id.to_string(); + let database_data = DatabaseData::from_json_bytes(data)?; + + let mut create_database_params = CreateDatabaseParams::from_database_data(database_data); + let old_view_id = create_database_params.inline_view_id.clone(); + create_database_params.inline_view_id = view_id.to_string(); + + if let Some(create_view_params) = create_database_params + .views + .iter_mut() + .find(|view| view.view_id == old_view_id) + { + create_view_params.view_id = view_id.to_string(); + } let wdb = self.get_workspace_database().await?; - let _ = wdb.create_database_with_data(database_data)?; + let _ = wdb.create_database(create_database_params)?; Ok(()) } @@ -346,7 +357,7 @@ impl DatabaseManager { .map_err(internal_error)??; let result = ImportResult { database_id: params.database_id.clone(), - view_id: params.view_id.clone(), + view_id: params.inline_view_id.clone(), }; self.create_database_with_params(params).await?; Ok(result) diff --git a/frontend/rust-lib/flowy-database2/src/services/database_view/view_editor.rs b/frontend/rust-lib/flowy-database2/src/services/database_view/view_editor.rs index e952cf4701..f0a85bbed8 100644 --- a/frontend/rust-lib/flowy-database2/src/services/database_view/view_editor.rs +++ b/frontend/rust-lib/flowy-database2/src/services/database_view/view_editor.rs @@ -128,6 +128,7 @@ impl DatabaseViewEditor { &self, params: CreateRowPayloadPB, ) -> FlowyResult { + let timestamp = timestamp(); let mut result = CreateRowParams { collab_params: collab_database::rows::CreateRowParams { id: gen_row_id(), @@ -135,7 +136,8 @@ impl DatabaseViewEditor { height: 60, visibility: true, row_position: params.row_position.try_into()?, - timestamp: timestamp(), + created_at: timestamp, + modified_at: timestamp, }, open_after_create: false, }; diff --git a/frontend/rust-lib/flowy-database2/src/services/share/csv/import.rs b/frontend/rust-lib/flowy-database2/src/services/share/csv/import.rs index aaa05fddc5..2425ebffd3 100644 --- a/frontend/rust-lib/flowy-database2/src/services/share/csv/import.rs +++ b/frontend/rust-lib/flowy-database2/src/services/share/csv/import.rs @@ -1,9 +1,9 @@ use std::{fs::File, io::prelude::*}; -use collab_database::database::{gen_database_id, gen_field_id, gen_row_id}; +use collab_database::database::{gen_database_id, gen_field_id, gen_row_id, timestamp}; use collab_database::fields::Field; use collab_database::rows::{new_cell_builder, Cell, CreateRowParams}; -use collab_database::views::{CreateDatabaseParams, DatabaseLayout}; +use collab_database::views::{CreateDatabaseParams, CreateViewParams, DatabaseLayout}; use flowy_error::{FlowyError, FlowyResult}; @@ -99,7 +99,7 @@ fn database_from_fields_and_rows( let field_settings = default_field_settings_for_fields(&fields, DatabaseLayout::Grid); - let created_rows = rows + let rows = rows .iter() .map(|cells| { let mut params = CreateRowParams::new(gen_row_id()); @@ -126,18 +126,23 @@ fn database_from_fields_and_rows( }) .collect::>(); + let timestamp = timestamp(); + CreateDatabaseParams { - database_id, - view_id: view_id.to_string(), - view_name: "".to_string(), - layout: DatabaseLayout::Grid, - layout_settings: Default::default(), - filters: vec![], - groups: vec![], - sorts: vec![], - created_rows, + database_id: database_id.clone(), + inline_view_id: view_id.to_string(), + rows, fields, - field_settings, + views: vec![CreateViewParams { + database_id, + view_id: view_id.to_string(), + name: "".to_string(), + layout: DatabaseLayout::Grid, + field_settings, + created_at: timestamp, + modified_at: timestamp, + ..Default::default() + }], } } @@ -179,7 +184,7 @@ mod tests { let result = importer .import_csv_from_string(gen_database_view_id(), s.to_string(), CSVFormat::Original) .unwrap(); - assert_eq!(result.created_rows.len(), 3); + assert_eq!(result.rows.len(), 3); assert_eq!(result.fields.len(), 6); assert_eq!(result.fields[0].name, "Name"); @@ -189,9 +194,9 @@ mod tests { assert_eq!(result.fields[4].name, "Checkbox"); assert_eq!(result.fields[5].name, "URL"); - assert_eq!(result.created_rows[0].cells.len(), 6); - assert_eq!(result.created_rows[1].cells.len(), 6); - assert_eq!(result.created_rows[2].cells.len(), 6); + assert_eq!(result.rows[0].cells.len(), 6); + assert_eq!(result.rows[1].cells.len(), 6); + assert_eq!(result.rows[2].cells.len(), 6); println!("{:?}", result); } diff --git a/frontend/rust-lib/flowy-database2/src/template.rs b/frontend/rust-lib/flowy-database2/src/template.rs index 4cc6b9a9cf..c61c5220e4 100644 --- a/frontend/rust-lib/flowy-database2/src/template.rs +++ b/frontend/rust-lib/flowy-database2/src/template.rs @@ -1,6 +1,8 @@ -use collab_database::database::{gen_database_id, gen_row_id}; +use collab_database::database::{gen_database_id, gen_row_id, timestamp}; use collab_database::rows::CreateRowParams; -use collab_database::views::{CreateDatabaseParams, DatabaseLayout, LayoutSettings}; +use collab_database::views::{ + CreateDatabaseParams, CreateViewParams, DatabaseLayout, LayoutSettings, +}; use crate::entities::FieldType; use crate::services::cell::{insert_select_option_cell, insert_text_cell}; @@ -11,6 +13,9 @@ use crate::services::field_settings::default_field_settings_for_fields; use crate::services::setting::{BoardLayoutSetting, CalendarLayoutSetting}; pub fn make_default_grid(view_id: &str, name: &str) -> CreateDatabaseParams { + let database_id = gen_database_id(); + let timestamp = timestamp(); + let text_field = FieldBuilder::from_field_type(FieldType::RichText) .name("Name") .primary(true) @@ -29,25 +34,35 @@ pub fn make_default_grid(view_id: &str, name: &str) -> CreateDatabaseParams { let field_settings = default_field_settings_for_fields(&fields, DatabaseLayout::Grid); CreateDatabaseParams { - database_id: gen_database_id(), - view_id: view_id.to_string(), - view_name: name.to_string(), - layout: DatabaseLayout::Grid, - layout_settings: Default::default(), - filters: vec![], - groups: vec![], - sorts: vec![], - created_rows: vec![ + database_id: database_id.clone(), + inline_view_id: view_id.to_string(), + views: vec![CreateViewParams { + database_id, + view_id: view_id.to_string(), + name: name.to_string(), + layout: DatabaseLayout::Grid, + layout_settings: Default::default(), + filters: vec![], + group_settings: vec![], + sorts: vec![], + field_settings, + created_at: timestamp, + modified_at: timestamp, + ..Default::default() + }], + rows: vec![ CreateRowParams::new(gen_row_id()), CreateRowParams::new(gen_row_id()), CreateRowParams::new(gen_row_id()), ], fields, - field_settings, } } pub fn make_default_board(view_id: &str, name: &str) -> CreateDatabaseParams { + let database_id = gen_database_id(); + let timestamp = timestamp(); + // text let text_field = FieldBuilder::from_field_type(FieldType::RichText) .name("Description") @@ -90,21 +105,31 @@ pub fn make_default_board(view_id: &str, name: &str) -> CreateDatabaseParams { layout_settings.insert(DatabaseLayout::Board, BoardLayoutSetting::new().into()); CreateDatabaseParams { - database_id: gen_database_id(), - view_id: view_id.to_string(), - view_name: name.to_string(), - layout: DatabaseLayout::Board, - layout_settings, - filters: vec![], - groups: vec![], - sorts: vec![], - created_rows: rows, + database_id: database_id.clone(), + inline_view_id: view_id.to_string(), + views: vec![CreateViewParams { + database_id, + view_id: view_id.to_string(), + name: name.to_string(), + layout: DatabaseLayout::Board, + layout_settings, + filters: vec![], + group_settings: vec![], + sorts: vec![], + field_settings, + created_at: timestamp, + modified_at: timestamp, + ..Default::default() + }], + rows, fields, - field_settings, } } pub fn make_default_calendar(view_id: &str, name: &str) -> CreateDatabaseParams { + let database_id = gen_database_id(); + let timestamp = timestamp(); + // text let text_field = FieldBuilder::from_field_type(FieldType::RichText) .name("Title") @@ -133,16 +158,23 @@ pub fn make_default_calendar(view_id: &str, name: &str) -> CreateDatabaseParams ); CreateDatabaseParams { - database_id: gen_database_id(), - view_id: view_id.to_string(), - view_name: name.to_string(), - layout: DatabaseLayout::Calendar, - layout_settings, - filters: vec![], - groups: vec![], - sorts: vec![], - created_rows: vec![], + database_id: database_id.clone(), + inline_view_id: view_id.to_string(), + views: vec![CreateViewParams { + database_id, + view_id: view_id.to_string(), + name: name.to_string(), + layout: DatabaseLayout::Calendar, + layout_settings, + filters: vec![], + group_settings: vec![], + sorts: vec![], + field_settings, + created_at: timestamp, + modified_at: timestamp, + ..Default::default() + }], + rows: vec![], fields, - field_settings, } } diff --git a/frontend/rust-lib/flowy-database2/tests/database/database_editor.rs b/frontend/rust-lib/flowy-database2/tests/database/database_editor.rs index cccaba68fe..6d96c7b46d 100644 --- a/frontend/rust-lib/flowy-database2/tests/database/database_editor.rs +++ b/frontend/rust-lib/flowy-database2/tests/database/database_editor.rs @@ -3,8 +3,7 @@ use std::sync::Arc; use collab_database::database::{gen_database_view_id, timestamp}; use collab_database::fields::Field; -use collab_database::rows::{CreateRowParams, RowDetail, RowId}; -use collab_database::views::OrderObjectPosition; +use collab_database::rows::{Row, RowDetail, RowId}; use lib_infra::box_any::BoxAny; use strum::EnumCount; @@ -404,14 +403,15 @@ impl<'a> TestRowBuilder<'a> { .clone() } - pub fn build(self) -> CreateRowParams { - CreateRowParams { + pub fn build(self) -> Row { + let timestamp = timestamp(); + Row { id: self.row_id, cells: self.cell_build.build(), height: 60, visibility: true, - row_position: OrderObjectPosition::End, - timestamp: timestamp(), + modified_at: timestamp, + created_at: timestamp, } } } diff --git a/frontend/rust-lib/flowy-database2/tests/database/mock_data/board_mock_data.rs b/frontend/rust-lib/flowy-database2/tests/database/mock_data/board_mock_data.rs index 722961a47b..96d66dd714 100644 --- a/frontend/rust-lib/flowy-database2/tests/database/mock_data/board_mock_data.rs +++ b/frontend/rust-lib/flowy-database2/tests/database/mock_data/board_mock_data.rs @@ -242,9 +242,12 @@ pub fn make_test_board() -> DatabaseData { let mut layout_settings = LayoutSettings::new(); layout_settings.insert(DatabaseLayout::Board, board_setting); + let database_id = gen_database_id(); + let inline_view_id = gen_database_view_id(); + let view = DatabaseView { - id: gen_database_view_id(), - database_id: gen_database_id(), + id: inline_view_id.clone(), + database_id: database_id.clone(), name: "".to_string(), layout: DatabaseLayout::Board, layout_settings, @@ -257,5 +260,12 @@ pub fn make_test_board() -> DatabaseData { modified_at: 0, field_settings, }; - DatabaseData { view, fields, rows } + + DatabaseData { + database_id, + inline_view_id, + views: vec![view], + fields, + rows, + } } diff --git a/frontend/rust-lib/flowy-database2/tests/database/mock_data/calendar_mock_data.rs b/frontend/rust-lib/flowy-database2/tests/database/mock_data/calendar_mock_data.rs index c2c352d878..121d43b531 100644 --- a/frontend/rust-lib/flowy-database2/tests/database/mock_data/calendar_mock_data.rs +++ b/frontend/rust-lib/flowy-database2/tests/database/mock_data/calendar_mock_data.rs @@ -106,9 +106,12 @@ pub fn make_test_calendar() -> DatabaseData { let mut layout_settings = LayoutSettings::new(); layout_settings.insert(DatabaseLayout::Calendar, calendar_setting); + let database_id = gen_database_id(); + let inline_view_id = gen_database_view_id(); + let view = DatabaseView { - id: gen_database_view_id(), - database_id: gen_database_id(), + database_id: database_id.clone(), + id: inline_view_id.clone(), name: "".to_string(), layout: DatabaseLayout::Calendar, layout_settings, @@ -122,5 +125,11 @@ pub fn make_test_calendar() -> DatabaseData { field_settings, }; - DatabaseData { view, fields, rows } + DatabaseData { + database_id, + inline_view_id, + views: vec![view], + fields, + rows, + } } diff --git a/frontend/rust-lib/flowy-database2/tests/database/mock_data/grid_mock_data.rs b/frontend/rust-lib/flowy-database2/tests/database/mock_data/grid_mock_data.rs index 0f47e706ae..8d2aac139c 100644 --- a/frontend/rust-lib/flowy-database2/tests/database/mock_data/grid_mock_data.rs +++ b/frontend/rust-lib/flowy-database2/tests/database/mock_data/grid_mock_data.rs @@ -265,16 +265,25 @@ pub fn make_test_grid() -> DatabaseData { rows.push(row); } + let database_id = gen_database_id(); + let inline_view_id = gen_database_view_id(); + let view = DatabaseView { - id: gen_database_id(), - database_id: gen_database_view_id(), + database_id: database_id.clone(), + id: inline_view_id.clone(), name: "".to_string(), layout: DatabaseLayout::Grid, field_settings, ..Default::default() }; - DatabaseData { view, fields, rows } + DatabaseData { + database_id, + inline_view_id, + views: vec![view], + fields, + rows, + } } pub fn make_no_date_test_grid() -> DatabaseData { @@ -344,14 +353,23 @@ pub fn make_no_date_test_grid() -> DatabaseData { rows.push(row); } + let database_id = gen_database_id(); + let inline_view_id = gen_database_view_id(); + let view = DatabaseView { - id: gen_database_view_id(), - database_id: gen_database_id(), + database_id: database_id.clone(), + id: inline_view_id.clone(), name: "".to_string(), layout: DatabaseLayout::Grid, field_settings, ..Default::default() }; - DatabaseData { view, fields, rows } + DatabaseData { + database_id, + inline_view_id, + views: vec![view], + fields, + rows, + } } diff --git a/frontend/rust-lib/lib-log/src/lib.rs b/frontend/rust-lib/lib-log/src/lib.rs index f8b0762a27..9ab8c88299 100644 --- a/frontend/rust-lib/lib-log/src/lib.rs +++ b/frontend/rust-lib/lib-log/src/lib.rs @@ -8,6 +8,7 @@ use tracing_appender::rolling::Rotation; use tracing_appender::{non_blocking::WorkerGuard, rolling::RollingFileAppender}; use tracing_bunyan_formatter::JsonStorageLayer; use tracing_subscriber::fmt::format::Writer; +use tracing_subscriber::fmt::MakeWriter; use tracing_subscriber::{layer::SubscriberExt, EnvFilter}; use crate::layer::FlowyFormattingLayer; @@ -87,6 +88,7 @@ impl Builder { .pretty() .with_env_filter(env_filter) .finish() + .with(FlowyFormattingLayer::new(StdoutWriter)) .with(JsonStorageLayer) .with(file_layer); set_global_default(subscriber).map_err(|e| format!("{:?}", e))?; @@ -103,3 +105,13 @@ impl tracing_subscriber::fmt::time::FormatTime for CustomTime { write!(w, "{}", Local::now().format("%Y-%m-%d %H:%M:%S")) } } + +pub struct StdoutWriter; + +impl<'a> MakeWriter<'a> for StdoutWriter { + type Writer = std::io::Stdout; + + fn make_writer(&'a self) -> Self::Writer { + std::io::stdout() + } +}