mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: add rename and change icon for workspace cloud api
This commit is contained in:
parent
26f8397624
commit
6f8834c776
24
frontend/appflowy_tauri/src-tauri/Cargo.lock
generated
24
frontend/appflowy_tauri/src-tauri/Cargo.lock
generated
@ -162,7 +162,7 @@ checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca"
|
||||
[[package]]
|
||||
name = "app-error"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
@ -714,7 +714,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "client-api"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"again",
|
||||
"anyhow",
|
||||
@ -1202,7 +1202,7 @@ dependencies = [
|
||||
"cssparser-macros",
|
||||
"dtoa-short",
|
||||
"itoa 1.0.6",
|
||||
"phf 0.8.0",
|
||||
"phf 0.11.2",
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
@ -1313,7 +1313,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
|
||||
[[package]]
|
||||
name = "database-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -2587,7 +2587,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gotrue"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"futures-util",
|
||||
@ -2604,7 +2604,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gotrue-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -3059,7 +3059,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "infra"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"reqwest",
|
||||
@ -4790,7 +4790,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "realtime-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
@ -4814,7 +4814,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "realtime-protocol"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
@ -5462,7 +5462,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "shared-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -6957,7 +6957,7 @@ checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc"
|
||||
[[package]]
|
||||
name = "websocket"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-util",
|
||||
@ -7376,7 +7376,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "workspace-template"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
|
@ -82,7 +82,7 @@ custom-protocol = ["tauri/custom-protocol"]
|
||||
# Run the script:
|
||||
# scripts/tool/update_client_api_rev.sh new_rev_id
|
||||
# ⚠️⚠️⚠️️
|
||||
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "375318774a53e2056b1d693b231eee3336ad1937" }
|
||||
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "5ed6a149433e34b3dc4bfc66446033a33258e48c" }
|
||||
# Please use the following script to update collab.
|
||||
# Working directory: frontend
|
||||
#
|
||||
|
38
frontend/appflowy_web/wasm-libs/Cargo.lock
generated
38
frontend/appflowy_web/wasm-libs/Cargo.lock
generated
@ -221,7 +221,7 @@ checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca"
|
||||
[[package]]
|
||||
name = "app-error"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
@ -545,7 +545,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "client-api"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"again",
|
||||
"anyhow",
|
||||
@ -901,7 +901,7 @@ dependencies = [
|
||||
"cssparser-macros",
|
||||
"dtoa-short",
|
||||
"itoa",
|
||||
"phf 0.8.0",
|
||||
"phf 0.11.2",
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
@ -946,7 +946,7 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5"
|
||||
[[package]]
|
||||
name = "database-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -1700,7 +1700,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gotrue"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"futures-util",
|
||||
@ -1717,7 +1717,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gotrue-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -2051,7 +2051,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "infra"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"reqwest",
|
||||
@ -2780,7 +2780,7 @@ version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12"
|
||||
dependencies = [
|
||||
"phf_macros",
|
||||
"phf_macros 0.8.0",
|
||||
"phf_shared 0.8.0",
|
||||
"proc-macro-hack",
|
||||
]
|
||||
@ -2800,6 +2800,7 @@ version = "0.11.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc"
|
||||
dependencies = [
|
||||
"phf_macros 0.11.2",
|
||||
"phf_shared 0.11.2",
|
||||
]
|
||||
|
||||
@ -2867,6 +2868,19 @@ dependencies = [
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_macros"
|
||||
version = "0.11.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b"
|
||||
dependencies = [
|
||||
"phf_generator 0.11.2",
|
||||
"phf_shared 0.11.2",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.48",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_shared"
|
||||
version = "0.8.0"
|
||||
@ -3295,7 +3309,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "realtime-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
@ -3319,7 +3333,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "realtime-protocol"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
@ -3766,7 +3780,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "shared-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -4708,7 +4722,7 @@ checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10"
|
||||
[[package]]
|
||||
name = "websocket"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-util",
|
||||
|
@ -55,7 +55,7 @@ codegen-units = 1
|
||||
# Run the script:
|
||||
# scripts/tool/update_client_api_rev.sh new_rev_id
|
||||
# ⚠️⚠️⚠️️
|
||||
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "375318774a53e2056b1d693b231eee3336ad1937" }
|
||||
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "5ed6a149433e34b3dc4bfc66446033a33258e48c" }
|
||||
# Please use the following script to update collab.
|
||||
# Working directory: frontend
|
||||
#
|
||||
|
40
frontend/rust-lib/Cargo.lock
generated
40
frontend/rust-lib/Cargo.lock
generated
@ -163,7 +163,7 @@ checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca"
|
||||
[[package]]
|
||||
name = "app-error"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
@ -673,7 +673,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "client-api"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"again",
|
||||
"anyhow",
|
||||
@ -1104,7 +1104,7 @@ dependencies = [
|
||||
"cssparser-macros",
|
||||
"dtoa-short",
|
||||
"itoa",
|
||||
"phf 0.8.0",
|
||||
"phf 0.11.2",
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
@ -1237,7 +1237,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
|
||||
[[package]]
|
||||
name = "database-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -2411,7 +2411,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gotrue"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"futures-util",
|
||||
@ -2428,7 +2428,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gotrue-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -2822,7 +2822,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "infra"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"reqwest",
|
||||
@ -3642,7 +3642,7 @@ version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12"
|
||||
dependencies = [
|
||||
"phf_macros",
|
||||
"phf_macros 0.8.0",
|
||||
"phf_shared 0.8.0",
|
||||
"proc-macro-hack",
|
||||
]
|
||||
@ -3662,6 +3662,7 @@ version = "0.11.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc"
|
||||
dependencies = [
|
||||
"phf_macros 0.11.2",
|
||||
"phf_shared 0.11.2",
|
||||
]
|
||||
|
||||
@ -3729,6 +3730,19 @@ dependencies = [
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_macros"
|
||||
version = "0.11.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b"
|
||||
dependencies = [
|
||||
"phf_generator 0.11.2",
|
||||
"phf_shared 0.11.2",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.47",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_shared"
|
||||
version = "0.8.0"
|
||||
@ -4305,7 +4319,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "realtime-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
@ -4329,7 +4343,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "realtime-protocol"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
@ -4917,7 +4931,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "shared-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -6107,7 +6121,7 @@ checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc"
|
||||
[[package]]
|
||||
name = "websocket"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-util",
|
||||
@ -6347,7 +6361,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "workspace-template"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=375318774a53e2056b1d693b231eee3336ad1937#375318774a53e2056b1d693b231eee3336ad1937"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=5ed6a149433e34b3dc4bfc66446033a33258e48c#5ed6a149433e34b3dc4bfc66446033a33258e48c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
|
@ -105,7 +105,7 @@ incremental = false
|
||||
# Run the script:
|
||||
# scripts/tool/update_client_api_rev.sh new_rev_id
|
||||
# ⚠️⚠️⚠️️
|
||||
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "375318774a53e2056b1d693b231eee3336ad1937" }
|
||||
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "5ed6a149433e34b3dc4bfc66446033a33258e48c" }
|
||||
# Please use the following script to update collab.
|
||||
# Working directory: frontend
|
||||
#
|
||||
|
@ -17,8 +17,9 @@ use flowy_server_pub::af_cloud_config::AFCloudConfiguration;
|
||||
use flowy_server_pub::AuthenticatorType;
|
||||
use flowy_user::entities::{
|
||||
AuthenticatorPB, CloudSettingPB, CreateWorkspacePB, ImportAppFlowyDataPB, OauthSignInPB,
|
||||
RepeatedUserWorkspacePB, SignInUrlPB, SignInUrlPayloadPB, SignUpPayloadPB, UpdateCloudConfigPB,
|
||||
UpdateUserProfilePayloadPB, UserProfilePB, UserWorkspaceIdPB, UserWorkspacePB,
|
||||
RenameWorkspacePB, RepeatedUserWorkspacePB, SignInUrlPB, SignInUrlPayloadPB, SignUpPayloadPB,
|
||||
UpdateCloudConfigPB, UpdateUserProfilePayloadPB, UserProfilePB, UserWorkspaceIdPB,
|
||||
UserWorkspacePB,
|
||||
};
|
||||
use flowy_user::errors::{FlowyError, FlowyResult};
|
||||
use flowy_user::event_map::UserEvent;
|
||||
@ -224,6 +225,27 @@ impl EventIntegrationTest {
|
||||
.parse::<UserWorkspacePB>()
|
||||
}
|
||||
|
||||
pub async fn rename_workspace(
|
||||
&self,
|
||||
workspace_id: &str,
|
||||
new_name: &str,
|
||||
) -> Result<(), FlowyError> {
|
||||
let payload = RenameWorkspacePB {
|
||||
workspace_id: workspace_id.to_owned(),
|
||||
new_name: new_name.to_owned(),
|
||||
};
|
||||
match EventBuilder::new(self.clone())
|
||||
.event(RenameWorkspace)
|
||||
.payload(payload)
|
||||
.async_send()
|
||||
.await
|
||||
.error()
|
||||
{
|
||||
Some(err) => Err(err),
|
||||
None => Ok(()),
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn get_all_workspaces(&self) -> RepeatedUserWorkspacePB {
|
||||
EventBuilder::new(self.clone())
|
||||
.event(GetAllWorkspace)
|
||||
|
@ -2,11 +2,26 @@ use std::time::Duration;
|
||||
|
||||
use event_integration::user_event::user_localhost_af_cloud;
|
||||
use event_integration::EventIntegrationTest;
|
||||
use flowy_user::entities::RepeatedUserWorkspacePB;
|
||||
use flowy_user::entities::{RepeatedUserWorkspacePB, UserWorkspacePB};
|
||||
use flowy_user::protobuf::UserNotification;
|
||||
|
||||
use crate::util::receive_with_timeout;
|
||||
|
||||
#[tokio::test]
|
||||
async fn af_cloud_workspace_name_change() {
|
||||
user_localhost_af_cloud().await;
|
||||
let test = EventIntegrationTest::new().await;
|
||||
let user_profile_pb = test.af_cloud_sign_up().await;
|
||||
let workspaces = test.get_all_workspaces().await;
|
||||
let workspace_id = workspaces.items[0].workspace_id.as_str();
|
||||
test
|
||||
.rename_workspace(workspace_id, "new_workspace_name")
|
||||
.await
|
||||
.expect("failed to rename workspace");
|
||||
let workspaces = get_synced_workspaces(test, user_profile_pb.id).await;
|
||||
assert_eq!(workspaces[0].name, "new_workspace_name".to_string());
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn af_cloud_create_workspace_test() {
|
||||
user_localhost_af_cloud().await;
|
||||
@ -16,18 +31,10 @@ async fn af_cloud_create_workspace_test() {
|
||||
let workspaces = test.get_all_workspaces().await.items;
|
||||
assert_eq!(workspaces.len(), 1);
|
||||
|
||||
test.create_workspace("my second workspace").await;
|
||||
let _workspaces = test.get_all_workspaces().await.items;
|
||||
|
||||
let a = user_profile_pb.id.to_string();
|
||||
let rx = test
|
||||
.notification_sender
|
||||
.subscribe::<RepeatedUserWorkspacePB>(&a, UserNotification::DidUpdateUserWorkspaces as i32);
|
||||
let workspaces = receive_with_timeout(rx, Duration::from_secs(30))
|
||||
.await
|
||||
.unwrap()
|
||||
.items;
|
||||
let created_workspace = test.create_workspace("my second workspace").await;
|
||||
assert_eq!(created_workspace.name, "my second workspace");
|
||||
|
||||
let workspaces = get_synced_workspaces(test, user_profile_pb.id).await;
|
||||
assert_eq!(workspaces.len(), 2);
|
||||
assert_eq!(workspaces[1].name, "my second workspace".to_string());
|
||||
}
|
||||
@ -50,3 +57,18 @@ async fn af_cloud_open_workspace_test() {
|
||||
assert_eq!(views[1].name, "my first document".to_string());
|
||||
assert_eq!(views[2].name, "my second document".to_string());
|
||||
}
|
||||
|
||||
async fn get_synced_workspaces(test: EventIntegrationTest, user_id: i64) -> Vec<UserWorkspacePB> {
|
||||
let _workspaces = test.get_all_workspaces().await.items;
|
||||
let sub_id = user_id.to_string();
|
||||
let rx = test
|
||||
.notification_sender
|
||||
.subscribe::<RepeatedUserWorkspacePB>(
|
||||
&sub_id,
|
||||
UserNotification::DidUpdateUserWorkspaces as i32,
|
||||
);
|
||||
receive_with_timeout(rx, Duration::from_secs(30))
|
||||
.await
|
||||
.unwrap()
|
||||
.items
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ use std::sync::Arc;
|
||||
|
||||
use anyhow::{anyhow, Error};
|
||||
use client_api::entity::workspace_dto::{
|
||||
CreateWorkspaceMember, CreateWorkspaceParam, WorkspaceMemberChangeset,
|
||||
CreateWorkspaceMember, CreateWorkspaceParam, PatchWorkspaceParam, WorkspaceMemberChangeset,
|
||||
};
|
||||
use client_api::entity::{AFRole, AFWorkspace, AuthProvider, CollabParams, CreateCollabParams};
|
||||
use client_api::{Client, ClientConfiguration};
|
||||
@ -16,6 +16,7 @@ use flowy_user_pub::cloud::{UserCloudService, UserCollabParams, UserUpdate, User
|
||||
use flowy_user_pub::entities::*;
|
||||
use lib_infra::box_any::BoxAny;
|
||||
use lib_infra::future::FutureResult;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::af_cloud::define::USER_SIGN_IN_URL;
|
||||
use crate::af_cloud::impls::user::dto::{
|
||||
@ -320,6 +321,32 @@ where
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
|
||||
fn patch_workspace(
|
||||
&self,
|
||||
workspace_id: &str,
|
||||
new_workspace_name: Option<&str>,
|
||||
new_workspace_icon: Option<&str>,
|
||||
) -> FutureResult<(), FlowyError> {
|
||||
let try_get_client = self.server.try_get_client();
|
||||
let owned_workspace_id = workspace_id.to_owned();
|
||||
let owned_workspace_name = new_workspace_name.map(|s| s.to_owned());
|
||||
let owned_workspace_icon = new_workspace_icon.map(|s| s.to_owned());
|
||||
FutureResult::new(async move {
|
||||
let workspace_id: Uuid = owned_workspace_id
|
||||
.parse()
|
||||
.map_err(|_| ErrorCode::InvalidParams)?;
|
||||
let client = try_get_client?;
|
||||
client
|
||||
.patch_workspace(PatchWorkspaceParam {
|
||||
workspace_id,
|
||||
workspace_name: owned_workspace_name,
|
||||
workspace_icon: owned_workspace_icon,
|
||||
})
|
||||
.await?;
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
async fn get_admin_client(client: &Arc<AFCloudClient>) -> FlowyResult<Client> {
|
||||
|
@ -179,7 +179,7 @@ impl UserCloudService for LocalServerUserAuthServiceImpl {
|
||||
FutureResult::new(async {
|
||||
Err(
|
||||
FlowyError::local_version_not_support()
|
||||
.with_context("local server doesn't support mulitple workspaces"),
|
||||
.with_context("local server doesn't support multiple workspaces"),
|
||||
)
|
||||
})
|
||||
}
|
||||
@ -188,7 +188,21 @@ impl UserCloudService for LocalServerUserAuthServiceImpl {
|
||||
FutureResult::new(async {
|
||||
Err(
|
||||
FlowyError::local_version_not_support()
|
||||
.with_context("local server doesn't support mulitple workspaces"),
|
||||
.with_context("local server doesn't support multiple workspaces"),
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn patch_workspace(
|
||||
&self,
|
||||
_workspace_id: &str,
|
||||
_new_workspace_name: Option<&str>,
|
||||
_new_workspace_icon: Option<&str>,
|
||||
) -> FutureResult<(), FlowyError> {
|
||||
FutureResult::new(async {
|
||||
Err(
|
||||
FlowyError::local_version_not_support()
|
||||
.with_context("local server doesn't support multiple workspaces"),
|
||||
)
|
||||
})
|
||||
}
|
||||
|
@ -372,6 +372,20 @@ where
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn patch_workspace(
|
||||
&self,
|
||||
_workspace_id: &str,
|
||||
_new_workspace_name: Option<&str>,
|
||||
_new_workspace_icon: Option<&str>,
|
||||
) -> FutureResult<(), FlowyError> {
|
||||
FutureResult::new(async {
|
||||
Err(
|
||||
FlowyError::local_version_not_support()
|
||||
.with_context("supabase server doesn't support mulitple workspaces"),
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
pub struct CreateCollabAction {
|
||||
|
@ -171,6 +171,14 @@ pub trait UserCloudService: Send + Sync + 'static {
|
||||
/// Returns the new workspace if successful
|
||||
fn create_workspace(&self, workspace_name: &str) -> FutureResult<UserWorkspace, FlowyError>;
|
||||
|
||||
// Updates the workspace name and icon
|
||||
fn patch_workspace(
|
||||
&self,
|
||||
workspace_id: &str,
|
||||
new_workspace_name: Option<&str>,
|
||||
new_workspace_icon: Option<&str>,
|
||||
) -> FutureResult<(), FlowyError>;
|
||||
|
||||
/// Deletes a workspace owned by the user.
|
||||
fn delete_workspace(&self, workspace_id: &str) -> FutureResult<(), FlowyError>;
|
||||
|
||||
|
@ -116,3 +116,25 @@ pub struct CreateWorkspacePB {
|
||||
#[validate(custom = "required_not_empty_str")]
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
#[derive(ProtoBuf, Default, Clone, Validate)]
|
||||
pub struct RenameWorkspacePB {
|
||||
#[pb(index = 1)]
|
||||
#[validate(custom = "required_not_empty_str")]
|
||||
pub workspace_id: String,
|
||||
|
||||
#[pb(index = 2)]
|
||||
#[validate(custom = "required_not_empty_str")]
|
||||
pub new_name: String,
|
||||
}
|
||||
|
||||
#[derive(ProtoBuf, Default, Clone, Validate)]
|
||||
pub struct ChangeWorkspaceIconPB {
|
||||
#[pb(index = 1)]
|
||||
#[validate(custom = "required_not_empty_str")]
|
||||
pub workspace_id: String,
|
||||
|
||||
#[pb(index = 2)]
|
||||
#[validate(custom = "required_not_empty_str")]
|
||||
pub new_icon: String,
|
||||
}
|
||||
|
@ -683,3 +683,29 @@ pub async fn delete_workspace_handler(
|
||||
manager.delete_workspace(&workspace_id).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tracing::instrument(level = "debug", skip_all, err)]
|
||||
pub async fn rename_workspace_handler(
|
||||
rename_workspace_param: AFPluginData<RenameWorkspacePB>,
|
||||
manager: AFPluginState<Weak<UserManager>>,
|
||||
) -> Result<(), FlowyError> {
|
||||
let params = rename_workspace_param.try_into_inner()?;
|
||||
let manager = upgrade_manager(manager)?;
|
||||
manager
|
||||
.patch_workspace(¶ms.workspace_id, Some(¶ms.new_name), None)
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tracing::instrument(level = "debug", skip_all, err)]
|
||||
pub async fn change_workspace_icon_handler(
|
||||
change_workspace_icon_param: AFPluginData<ChangeWorkspaceIconPB>,
|
||||
manager: AFPluginState<Weak<UserManager>>,
|
||||
) -> Result<(), FlowyError> {
|
||||
let params = change_workspace_icon_param.try_into_inner()?;
|
||||
let manager = upgrade_manager(manager)?;
|
||||
manager
|
||||
.patch_workspace(¶ms.workspace_id, None, Some(¶ms.new_icon))
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
@ -62,6 +62,8 @@ pub fn init(user_manager: Weak<UserManager>) -> AFPlugin {
|
||||
.event(UserEvent::GetAllWorkspace, get_all_workspace_handler)
|
||||
.event(UserEvent::CreateWorkspace, create_workspace_handler)
|
||||
.event(UserEvent::DeleteWorkspace, delete_workspace_handler)
|
||||
.event(UserEvent::RenameWorkspace, rename_workspace_handler)
|
||||
.event(UserEvent::ChangeWorkspaceIcon, change_workspace_icon_handler)
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Debug, Display, Hash, ProtoBuf_Enum, Flowy_Event)]
|
||||
@ -200,6 +202,12 @@ pub enum UserEvent {
|
||||
|
||||
#[event(input = "UserWorkspaceIdPB")]
|
||||
DeleteWorkspace = 43,
|
||||
|
||||
#[event(input = "RenameWorkspacePB")]
|
||||
RenameWorkspace = 44,
|
||||
|
||||
#[event(input = "ChangeWorkspaceIconPB")]
|
||||
ChangeWorkspaceIcon = 45,
|
||||
}
|
||||
|
||||
pub trait UserStatusCallback: Send + Sync + 'static {
|
||||
|
@ -167,6 +167,21 @@ impl UserManager {
|
||||
Ok(new_workspace)
|
||||
}
|
||||
|
||||
pub async fn patch_workspace(
|
||||
&self,
|
||||
workspace_id: &str,
|
||||
new_workspace_name: Option<&str>,
|
||||
new_workspace_icon: Option<&str>,
|
||||
) -> FlowyResult<()> {
|
||||
self
|
||||
.cloud_services
|
||||
.get_user_service()?
|
||||
.patch_workspace(workspace_id, new_workspace_name, new_workspace_icon)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn delete_workspace(&self, workspace_id: &str) -> FlowyResult<()> {
|
||||
self
|
||||
.cloud_services
|
||||
|
Loading…
Reference in New Issue
Block a user