mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: improve link between folder and database (#5024)
* chore: improve link between folder and database * chore: fix tests * chore: update collab rev --------- Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
This commit is contained in:
14
frontend/appflowy_tauri/src-tauri/Cargo.lock
generated
14
frontend/appflowy_tauri/src-tauri/Cargo.lock
generated
@ -859,7 +859,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab"
|
name = "collab"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@ -883,7 +883,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-database"
|
name = "collab-database"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@ -913,7 +913,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-document"
|
name = "collab-document"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"collab",
|
"collab",
|
||||||
@ -932,7 +932,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-entity"
|
name = "collab-entity"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
@ -947,7 +947,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-folder"
|
name = "collab-folder"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"chrono",
|
"chrono",
|
||||||
@ -985,7 +985,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-plugins"
|
name = "collab-plugins"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-stream",
|
"async-stream",
|
||||||
@ -1063,7 +1063,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-user"
|
name = "collab-user"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"collab",
|
"collab",
|
||||||
|
@ -98,10 +98,10 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "390
|
|||||||
# To switch to the local path, run:
|
# To switch to the local path, run:
|
||||||
# scripts/tool/update_collab_source.sh
|
# scripts/tool/update_collab_source.sh
|
||||||
# ⚠️⚠️⚠️️
|
# ⚠️⚠️⚠️️
|
||||||
collab = { 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 = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
|
@ -65,10 +65,10 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "390
|
|||||||
# To switch to the local path, run:
|
# To switch to the local path, run:
|
||||||
# scripts/tool/update_collab_source.sh
|
# scripts/tool/update_collab_source.sh
|
||||||
# ⚠️⚠️⚠️️
|
# ⚠️⚠️⚠️️
|
||||||
collab = { 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 = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
|
14
frontend/appflowy_web_app/src-tauri/Cargo.lock
generated
14
frontend/appflowy_web_app/src-tauri/Cargo.lock
generated
@ -842,7 +842,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab"
|
name = "collab"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@ -866,7 +866,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-database"
|
name = "collab-database"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@ -896,7 +896,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-document"
|
name = "collab-document"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"collab",
|
"collab",
|
||||||
@ -915,7 +915,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-entity"
|
name = "collab-entity"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
@ -930,7 +930,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-folder"
|
name = "collab-folder"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"chrono",
|
"chrono",
|
||||||
@ -968,7 +968,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-plugins"
|
name = "collab-plugins"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-stream",
|
"async-stream",
|
||||||
@ -1046,7 +1046,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-user"
|
name = "collab-user"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"collab",
|
"collab",
|
||||||
|
@ -97,10 +97,10 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "390
|
|||||||
# To switch to the local path, run:
|
# To switch to the local path, run:
|
||||||
# scripts/tool/update_collab_source.sh
|
# scripts/tool/update_collab_source.sh
|
||||||
# ⚠️⚠️⚠️️
|
# ⚠️⚠️⚠️️
|
||||||
collab = { 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 = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
|
14
frontend/rust-lib/Cargo.lock
generated
14
frontend/rust-lib/Cargo.lock
generated
@ -784,7 +784,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab"
|
name = "collab"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@ -808,7 +808,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-database"
|
name = "collab-database"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@ -838,7 +838,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-document"
|
name = "collab-document"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"collab",
|
"collab",
|
||||||
@ -857,7 +857,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-entity"
|
name = "collab-entity"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
@ -872,7 +872,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-folder"
|
name = "collab-folder"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"chrono",
|
"chrono",
|
||||||
@ -910,7 +910,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-plugins"
|
name = "collab-plugins"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-stream",
|
"async-stream",
|
||||||
@ -988,7 +988,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-user"
|
name = "collab-user"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"collab",
|
"collab",
|
||||||
|
@ -125,10 +125,10 @@ client-api = { git = " https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "39
|
|||||||
# To switch to the local path, run:
|
# To switch to the local path, run:
|
||||||
# scripts/tool/update_collab_source.sh
|
# scripts/tool/update_collab_source.sh
|
||||||
# ⚠️⚠️⚠️️
|
# ⚠️⚠️⚠️️
|
||||||
collab = { 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 = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f1ef8ef3c179a7340d91ad6e5e176cc980accb9c" }
|
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5e32057ac8e6939368a8e75df91bcbce2ac143e7" }
|
||||||
|
@ -282,7 +282,7 @@ impl DatabaseManager {
|
|||||||
|
|
||||||
pub async fn duplicate_database(&self, view_id: &str) -> FlowyResult<Vec<u8>> {
|
pub async fn duplicate_database(&self, view_id: &str) -> FlowyResult<Vec<u8>> {
|
||||||
let wdb = self.get_workspace_database().await?;
|
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()?;
|
let json_bytes = data.to_json_bytes()?;
|
||||||
Ok(json_bytes)
|
Ok(json_bytes)
|
||||||
}
|
}
|
||||||
@ -294,11 +294,22 @@ impl DatabaseManager {
|
|||||||
view_id: &str,
|
view_id: &str,
|
||||||
data: Vec<u8>,
|
data: Vec<u8>,
|
||||||
) -> FlowyResult<()> {
|
) -> FlowyResult<()> {
|
||||||
let mut database_data = DatabaseData::from_json_bytes(data)?;
|
let database_data = DatabaseData::from_json_bytes(data)?;
|
||||||
database_data.view.id = view_id.to_string();
|
|
||||||
|
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 = self.get_workspace_database().await?;
|
||||||
let _ = wdb.create_database_with_data(database_data)?;
|
let _ = wdb.create_database(create_database_params)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -346,7 +357,7 @@ impl DatabaseManager {
|
|||||||
.map_err(internal_error)??;
|
.map_err(internal_error)??;
|
||||||
let result = ImportResult {
|
let result = ImportResult {
|
||||||
database_id: params.database_id.clone(),
|
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?;
|
self.create_database_with_params(params).await?;
|
||||||
Ok(result)
|
Ok(result)
|
||||||
|
@ -128,6 +128,7 @@ impl DatabaseViewEditor {
|
|||||||
&self,
|
&self,
|
||||||
params: CreateRowPayloadPB,
|
params: CreateRowPayloadPB,
|
||||||
) -> FlowyResult<CreateRowParams> {
|
) -> FlowyResult<CreateRowParams> {
|
||||||
|
let timestamp = timestamp();
|
||||||
let mut result = CreateRowParams {
|
let mut result = CreateRowParams {
|
||||||
collab_params: collab_database::rows::CreateRowParams {
|
collab_params: collab_database::rows::CreateRowParams {
|
||||||
id: gen_row_id(),
|
id: gen_row_id(),
|
||||||
@ -135,7 +136,8 @@ impl DatabaseViewEditor {
|
|||||||
height: 60,
|
height: 60,
|
||||||
visibility: true,
|
visibility: true,
|
||||||
row_position: params.row_position.try_into()?,
|
row_position: params.row_position.try_into()?,
|
||||||
timestamp: timestamp(),
|
created_at: timestamp,
|
||||||
|
modified_at: timestamp,
|
||||||
},
|
},
|
||||||
open_after_create: false,
|
open_after_create: false,
|
||||||
};
|
};
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
use std::{fs::File, io::prelude::*};
|
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::fields::Field;
|
||||||
use collab_database::rows::{new_cell_builder, Cell, CreateRowParams};
|
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};
|
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 field_settings = default_field_settings_for_fields(&fields, DatabaseLayout::Grid);
|
||||||
|
|
||||||
let created_rows = rows
|
let rows = rows
|
||||||
.iter()
|
.iter()
|
||||||
.map(|cells| {
|
.map(|cells| {
|
||||||
let mut params = CreateRowParams::new(gen_row_id());
|
let mut params = CreateRowParams::new(gen_row_id());
|
||||||
@ -126,18 +126,23 @@ fn database_from_fields_and_rows(
|
|||||||
})
|
})
|
||||||
.collect::<Vec<CreateRowParams>>();
|
.collect::<Vec<CreateRowParams>>();
|
||||||
|
|
||||||
|
let timestamp = timestamp();
|
||||||
|
|
||||||
CreateDatabaseParams {
|
CreateDatabaseParams {
|
||||||
database_id,
|
database_id: database_id.clone(),
|
||||||
view_id: view_id.to_string(),
|
inline_view_id: view_id.to_string(),
|
||||||
view_name: "".to_string(),
|
rows,
|
||||||
layout: DatabaseLayout::Grid,
|
|
||||||
layout_settings: Default::default(),
|
|
||||||
filters: vec![],
|
|
||||||
groups: vec![],
|
|
||||||
sorts: vec![],
|
|
||||||
created_rows,
|
|
||||||
fields,
|
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
|
let result = importer
|
||||||
.import_csv_from_string(gen_database_view_id(), s.to_string(), CSVFormat::Original)
|
.import_csv_from_string(gen_database_view_id(), s.to_string(), CSVFormat::Original)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
assert_eq!(result.created_rows.len(), 3);
|
assert_eq!(result.rows.len(), 3);
|
||||||
assert_eq!(result.fields.len(), 6);
|
assert_eq!(result.fields.len(), 6);
|
||||||
|
|
||||||
assert_eq!(result.fields[0].name, "Name");
|
assert_eq!(result.fields[0].name, "Name");
|
||||||
@ -189,9 +194,9 @@ mod tests {
|
|||||||
assert_eq!(result.fields[4].name, "Checkbox");
|
assert_eq!(result.fields[4].name, "Checkbox");
|
||||||
assert_eq!(result.fields[5].name, "URL");
|
assert_eq!(result.fields[5].name, "URL");
|
||||||
|
|
||||||
assert_eq!(result.created_rows[0].cells.len(), 6);
|
assert_eq!(result.rows[0].cells.len(), 6);
|
||||||
assert_eq!(result.created_rows[1].cells.len(), 6);
|
assert_eq!(result.rows[1].cells.len(), 6);
|
||||||
assert_eq!(result.created_rows[2].cells.len(), 6);
|
assert_eq!(result.rows[2].cells.len(), 6);
|
||||||
|
|
||||||
println!("{:?}", result);
|
println!("{:?}", result);
|
||||||
}
|
}
|
||||||
|
@ -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::rows::CreateRowParams;
|
||||||
use collab_database::views::{CreateDatabaseParams, DatabaseLayout, LayoutSettings};
|
use collab_database::views::{
|
||||||
|
CreateDatabaseParams, CreateViewParams, DatabaseLayout, LayoutSettings,
|
||||||
|
};
|
||||||
|
|
||||||
use crate::entities::FieldType;
|
use crate::entities::FieldType;
|
||||||
use crate::services::cell::{insert_select_option_cell, insert_text_cell};
|
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};
|
use crate::services::setting::{BoardLayoutSetting, CalendarLayoutSetting};
|
||||||
|
|
||||||
pub fn make_default_grid(view_id: &str, name: &str) -> CreateDatabaseParams {
|
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)
|
let text_field = FieldBuilder::from_field_type(FieldType::RichText)
|
||||||
.name("Name")
|
.name("Name")
|
||||||
.primary(true)
|
.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);
|
let field_settings = default_field_settings_for_fields(&fields, DatabaseLayout::Grid);
|
||||||
|
|
||||||
CreateDatabaseParams {
|
CreateDatabaseParams {
|
||||||
database_id: gen_database_id(),
|
database_id: database_id.clone(),
|
||||||
view_id: view_id.to_string(),
|
inline_view_id: view_id.to_string(),
|
||||||
view_name: name.to_string(),
|
views: vec![CreateViewParams {
|
||||||
layout: DatabaseLayout::Grid,
|
database_id,
|
||||||
layout_settings: Default::default(),
|
view_id: view_id.to_string(),
|
||||||
filters: vec![],
|
name: name.to_string(),
|
||||||
groups: vec![],
|
layout: DatabaseLayout::Grid,
|
||||||
sorts: vec![],
|
layout_settings: Default::default(),
|
||||||
created_rows: vec![
|
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()),
|
CreateRowParams::new(gen_row_id()),
|
||||||
CreateRowParams::new(gen_row_id()),
|
CreateRowParams::new(gen_row_id()),
|
||||||
],
|
],
|
||||||
fields,
|
fields,
|
||||||
field_settings,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn make_default_board(view_id: &str, name: &str) -> CreateDatabaseParams {
|
pub fn make_default_board(view_id: &str, name: &str) -> CreateDatabaseParams {
|
||||||
|
let database_id = gen_database_id();
|
||||||
|
let timestamp = timestamp();
|
||||||
|
|
||||||
// text
|
// text
|
||||||
let text_field = FieldBuilder::from_field_type(FieldType::RichText)
|
let text_field = FieldBuilder::from_field_type(FieldType::RichText)
|
||||||
.name("Description")
|
.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());
|
layout_settings.insert(DatabaseLayout::Board, BoardLayoutSetting::new().into());
|
||||||
|
|
||||||
CreateDatabaseParams {
|
CreateDatabaseParams {
|
||||||
database_id: gen_database_id(),
|
database_id: database_id.clone(),
|
||||||
view_id: view_id.to_string(),
|
inline_view_id: view_id.to_string(),
|
||||||
view_name: name.to_string(),
|
views: vec![CreateViewParams {
|
||||||
layout: DatabaseLayout::Board,
|
database_id,
|
||||||
layout_settings,
|
view_id: view_id.to_string(),
|
||||||
filters: vec![],
|
name: name.to_string(),
|
||||||
groups: vec![],
|
layout: DatabaseLayout::Board,
|
||||||
sorts: vec![],
|
layout_settings,
|
||||||
created_rows: rows,
|
filters: vec![],
|
||||||
|
group_settings: vec![],
|
||||||
|
sorts: vec![],
|
||||||
|
field_settings,
|
||||||
|
created_at: timestamp,
|
||||||
|
modified_at: timestamp,
|
||||||
|
..Default::default()
|
||||||
|
}],
|
||||||
|
rows,
|
||||||
fields,
|
fields,
|
||||||
field_settings,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn make_default_calendar(view_id: &str, name: &str) -> CreateDatabaseParams {
|
pub fn make_default_calendar(view_id: &str, name: &str) -> CreateDatabaseParams {
|
||||||
|
let database_id = gen_database_id();
|
||||||
|
let timestamp = timestamp();
|
||||||
|
|
||||||
// text
|
// text
|
||||||
let text_field = FieldBuilder::from_field_type(FieldType::RichText)
|
let text_field = FieldBuilder::from_field_type(FieldType::RichText)
|
||||||
.name("Title")
|
.name("Title")
|
||||||
@ -133,16 +158,23 @@ pub fn make_default_calendar(view_id: &str, name: &str) -> CreateDatabaseParams
|
|||||||
);
|
);
|
||||||
|
|
||||||
CreateDatabaseParams {
|
CreateDatabaseParams {
|
||||||
database_id: gen_database_id(),
|
database_id: database_id.clone(),
|
||||||
view_id: view_id.to_string(),
|
inline_view_id: view_id.to_string(),
|
||||||
view_name: name.to_string(),
|
views: vec![CreateViewParams {
|
||||||
layout: DatabaseLayout::Calendar,
|
database_id,
|
||||||
layout_settings,
|
view_id: view_id.to_string(),
|
||||||
filters: vec![],
|
name: name.to_string(),
|
||||||
groups: vec![],
|
layout: DatabaseLayout::Calendar,
|
||||||
sorts: vec![],
|
layout_settings,
|
||||||
created_rows: vec![],
|
filters: vec![],
|
||||||
|
group_settings: vec![],
|
||||||
|
sorts: vec![],
|
||||||
|
field_settings,
|
||||||
|
created_at: timestamp,
|
||||||
|
modified_at: timestamp,
|
||||||
|
..Default::default()
|
||||||
|
}],
|
||||||
|
rows: vec![],
|
||||||
fields,
|
fields,
|
||||||
field_settings,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,7 @@ use std::sync::Arc;
|
|||||||
|
|
||||||
use collab_database::database::{gen_database_view_id, timestamp};
|
use collab_database::database::{gen_database_view_id, timestamp};
|
||||||
use collab_database::fields::Field;
|
use collab_database::fields::Field;
|
||||||
use collab_database::rows::{CreateRowParams, RowDetail, RowId};
|
use collab_database::rows::{Row, RowDetail, RowId};
|
||||||
use collab_database::views::OrderObjectPosition;
|
|
||||||
use lib_infra::box_any::BoxAny;
|
use lib_infra::box_any::BoxAny;
|
||||||
use strum::EnumCount;
|
use strum::EnumCount;
|
||||||
|
|
||||||
@ -404,14 +403,15 @@ impl<'a> TestRowBuilder<'a> {
|
|||||||
.clone()
|
.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn build(self) -> CreateRowParams {
|
pub fn build(self) -> Row {
|
||||||
CreateRowParams {
|
let timestamp = timestamp();
|
||||||
|
Row {
|
||||||
id: self.row_id,
|
id: self.row_id,
|
||||||
cells: self.cell_build.build(),
|
cells: self.cell_build.build(),
|
||||||
height: 60,
|
height: 60,
|
||||||
visibility: true,
|
visibility: true,
|
||||||
row_position: OrderObjectPosition::End,
|
modified_at: timestamp,
|
||||||
timestamp: timestamp(),
|
created_at: timestamp,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -242,9 +242,12 @@ pub fn make_test_board() -> DatabaseData {
|
|||||||
let mut layout_settings = LayoutSettings::new();
|
let mut layout_settings = LayoutSettings::new();
|
||||||
layout_settings.insert(DatabaseLayout::Board, board_setting);
|
layout_settings.insert(DatabaseLayout::Board, board_setting);
|
||||||
|
|
||||||
|
let database_id = gen_database_id();
|
||||||
|
let inline_view_id = gen_database_view_id();
|
||||||
|
|
||||||
let view = DatabaseView {
|
let view = DatabaseView {
|
||||||
id: gen_database_view_id(),
|
id: inline_view_id.clone(),
|
||||||
database_id: gen_database_id(),
|
database_id: database_id.clone(),
|
||||||
name: "".to_string(),
|
name: "".to_string(),
|
||||||
layout: DatabaseLayout::Board,
|
layout: DatabaseLayout::Board,
|
||||||
layout_settings,
|
layout_settings,
|
||||||
@ -257,5 +260,12 @@ pub fn make_test_board() -> DatabaseData {
|
|||||||
modified_at: 0,
|
modified_at: 0,
|
||||||
field_settings,
|
field_settings,
|
||||||
};
|
};
|
||||||
DatabaseData { view, fields, rows }
|
|
||||||
|
DatabaseData {
|
||||||
|
database_id,
|
||||||
|
inline_view_id,
|
||||||
|
views: vec![view],
|
||||||
|
fields,
|
||||||
|
rows,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,9 +106,12 @@ pub fn make_test_calendar() -> DatabaseData {
|
|||||||
let mut layout_settings = LayoutSettings::new();
|
let mut layout_settings = LayoutSettings::new();
|
||||||
layout_settings.insert(DatabaseLayout::Calendar, calendar_setting);
|
layout_settings.insert(DatabaseLayout::Calendar, calendar_setting);
|
||||||
|
|
||||||
|
let database_id = gen_database_id();
|
||||||
|
let inline_view_id = gen_database_view_id();
|
||||||
|
|
||||||
let view = DatabaseView {
|
let view = DatabaseView {
|
||||||
id: gen_database_view_id(),
|
database_id: database_id.clone(),
|
||||||
database_id: gen_database_id(),
|
id: inline_view_id.clone(),
|
||||||
name: "".to_string(),
|
name: "".to_string(),
|
||||||
layout: DatabaseLayout::Calendar,
|
layout: DatabaseLayout::Calendar,
|
||||||
layout_settings,
|
layout_settings,
|
||||||
@ -122,5 +125,11 @@ pub fn make_test_calendar() -> DatabaseData {
|
|||||||
field_settings,
|
field_settings,
|
||||||
};
|
};
|
||||||
|
|
||||||
DatabaseData { view, fields, rows }
|
DatabaseData {
|
||||||
|
database_id,
|
||||||
|
inline_view_id,
|
||||||
|
views: vec![view],
|
||||||
|
fields,
|
||||||
|
rows,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -265,16 +265,25 @@ pub fn make_test_grid() -> DatabaseData {
|
|||||||
rows.push(row);
|
rows.push(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let database_id = gen_database_id();
|
||||||
|
let inline_view_id = gen_database_view_id();
|
||||||
|
|
||||||
let view = DatabaseView {
|
let view = DatabaseView {
|
||||||
id: gen_database_id(),
|
database_id: database_id.clone(),
|
||||||
database_id: gen_database_view_id(),
|
id: inline_view_id.clone(),
|
||||||
name: "".to_string(),
|
name: "".to_string(),
|
||||||
layout: DatabaseLayout::Grid,
|
layout: DatabaseLayout::Grid,
|
||||||
field_settings,
|
field_settings,
|
||||||
..Default::default()
|
..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 {
|
pub fn make_no_date_test_grid() -> DatabaseData {
|
||||||
@ -344,14 +353,23 @@ pub fn make_no_date_test_grid() -> DatabaseData {
|
|||||||
rows.push(row);
|
rows.push(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let database_id = gen_database_id();
|
||||||
|
let inline_view_id = gen_database_view_id();
|
||||||
|
|
||||||
let view = DatabaseView {
|
let view = DatabaseView {
|
||||||
id: gen_database_view_id(),
|
database_id: database_id.clone(),
|
||||||
database_id: gen_database_id(),
|
id: inline_view_id.clone(),
|
||||||
name: "".to_string(),
|
name: "".to_string(),
|
||||||
layout: DatabaseLayout::Grid,
|
layout: DatabaseLayout::Grid,
|
||||||
field_settings,
|
field_settings,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
DatabaseData { view, fields, rows }
|
DatabaseData {
|
||||||
|
database_id,
|
||||||
|
inline_view_id,
|
||||||
|
views: vec![view],
|
||||||
|
fields,
|
||||||
|
rows,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user