diff --git a/.github/workflows/tauri_ci.yaml b/.github/workflows/tauri_ci.yaml
index 419ed95535..45acc5702d 100644
--- a/.github/workflows/tauri_ci.yaml
+++ b/.github/workflows/tauri_ci.yaml
@@ -2,11 +2,12 @@ name: Tauri-CI
on:
pull_request:
paths:
- - "frontend/rust-lib/**"
- - "frontend/appflowy_tauri/**"
+# - "frontend/rust-lib/**"
+# - "frontend/appflowy_tauri/**"
env:
NODE_VERSION: "16"
+ PNPM_VERSION: "7.17.1"
RUST_TOOLCHAIN: "1.65"
jobs:
@@ -14,8 +15,8 @@ jobs:
strategy:
fail-fast: false
matrix:
- # platform: [macos-latest, ubuntu-20.04, windows-latest]
- platform: [macos-latest]
+# platform: [macos-latest, ubuntu-20.04, windows-latest]
+ platform: [ubuntu-20.04]
runs-on: ${{ matrix.platform }}
steps:
@@ -45,6 +46,7 @@ jobs:
cargo install --force duckscript_cli
vcpkg integrate install
cargo make appflowy-tauri-deps-tools
+ npm install -g pnpm@${{ env.PNPM_VERSION }}
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
@@ -54,28 +56,25 @@ jobs:
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
cargo install --force cargo-make
cargo make appflowy-tauri-deps-tools
+ npm install -g pnpm@${{ env.PNPM_VERSION }}
- name: install dependencies (macOS only)
if: matrix.platform == 'macos-latest'
working-directory: frontend
run: |
+ brew install llvm
cargo install --force cargo-make
cargo make appflowy-tauri-deps-tools
+ npm install -g pnpm@${{ env.PNPM_VERSION }}
- # - name: lint
- # working-directory: frontend/appflowy_tauri
- # run: |
- # yarn --frozen-lockfile
- # yarn test:prettier
- # yarn test:code
- name: build
working-directory: frontend/appflowy_tauri
run: |
mkdir dist
- npm install
- cargo make --cwd .. tauri_build
- yarn && yarn build
+ pnpm install
+ cargo make --cwd .. tauri_build
+ pnpm test:errors
- uses: tauri-apps/tauri-action@v0
env:
diff --git a/frontend/.vscode/tasks.json b/frontend/.vscode/tasks.json
index 4f8a52c95c..4069eaeef1 100644
--- a/frontend/.vscode/tasks.json
+++ b/frontend/.vscode/tasks.json
@@ -180,7 +180,7 @@
{
"label": "AF: Tauri UI Build",
"type": "shell",
- "command": "npm run build",
+ "command": "pnpm run build",
"options": {
"cwd": "${workspaceFolder}/appflowy_tauri"
}
diff --git a/frontend/appflowy_tauri/package.json b/frontend/appflowy_tauri/package.json
index 9d94c7d366..7be38da1c0 100644
--- a/frontend/appflowy_tauri/package.json
+++ b/frontend/appflowy_tauri/package.json
@@ -9,7 +9,7 @@
"preview": "vite preview",
"format": "prettier --write .",
"test:code": "eslint --max-warnings=0 --ext .js,.ts,.tsx .",
- "test:errors": "tsc --noEmit",
+ "test:errors": "tsc --noEmit && eslint --quiet --ext .js,.ts,.tsx .",
"test:prettier": "yarn prettier --list-different src",
"tauri:clean": "cargo make --cwd .. tauri_clean",
"tauri:dev": "tauri dev"
diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.lock b/frontend/appflowy_tauri/src-tauri/Cargo.lock
index 19719ed721..8179cbe36f 100644
--- a/frontend/appflowy_tauri/src-tauri/Cargo.lock
+++ b/frontend/appflowy_tauri/src-tauri/Cargo.lock
@@ -545,10 +545,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58549f1842da3080ce63002102d5bc954c7bc843d4f47818e642abdc36253552"
dependencies = [
"chrono",
- "chrono-tz-build",
+ "chrono-tz-build 0.0.2",
"phf 0.10.1",
]
+[[package]]
+name = "chrono-tz"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf9cc2b23599e6d7479755f3594285efb3f74a1bdca7a7374948bc831e23a552"
+dependencies = [
+ "chrono",
+ "chrono-tz-build 0.1.0",
+ "phf 0.11.1",
+]
+
[[package]]
name = "chrono-tz-build"
version = "0.0.2"
@@ -560,6 +571,17 @@ dependencies = [
"phf_codegen 0.10.0",
]
+[[package]]
+name = "chrono-tz-build"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9998fb9f7e9b2111641485bf8beb32f92945f97f92a3d061f744cfef335f751"
+dependencies = [
+ "parse-zoneinfo",
+ "phf 0.11.1",
+ "phf_codegen 0.11.1",
+]
+
[[package]]
name = "clang-sys"
version = "1.6.1"
@@ -640,11 +662,10 @@ dependencies = [
[[package]]
name = "collab"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=935868#93586873d1982d3b4ab96993a39810e4bb4d1993"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [
"anyhow",
"bytes",
- "collab-persistence",
"lib0",
"parking_lot 0.12.1",
"serde",
@@ -655,16 +676,35 @@ dependencies = [
"yrs",
]
+[[package]]
+name = "collab-client-ws"
+version = "0.1.0"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
+dependencies = [
+ "bytes",
+ "collab-sync",
+ "futures-util",
+ "serde",
+ "serde_json",
+ "thiserror",
+ "tokio",
+ "tokio-retry",
+ "tokio-stream",
+ "tokio-tungstenite 0.18.0",
+ "tracing",
+]
+
[[package]]
name = "collab-database"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=935868#93586873d1982d3b4ab96993a39810e4bb4d1993"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [
"anyhow",
"chrono",
"collab",
"collab-derive",
"collab-persistence",
+ "collab-plugins",
"lazy_static",
"lru",
"nanoid",
@@ -680,7 +720,7 @@ dependencies = [
[[package]]
name = "collab-derive"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=935868#93586873d1982d3b4ab96993a39810e4bb4d1993"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [
"proc-macro2",
"quote",
@@ -692,7 +732,7 @@ dependencies = [
[[package]]
name = "collab-document"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=935868#93586873d1982d3b4ab96993a39810e4bb4d1993"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [
"anyhow",
"collab",
@@ -709,7 +749,7 @@ dependencies = [
[[package]]
name = "collab-folder"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=935868#93586873d1982d3b4ab96993a39810e4bb4d1993"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [
"anyhow",
"collab",
@@ -727,7 +767,7 @@ dependencies = [
[[package]]
name = "collab-persistence"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=935868#93586873d1982d3b4ab96993a39810e4bb4d1993"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
dependencies = [
"bincode",
"chrono",
@@ -744,6 +784,42 @@ dependencies = [
"yrs",
]
+[[package]]
+name = "collab-plugins"
+version = "0.1.0"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
+dependencies = [
+ "collab",
+ "collab-client-ws",
+ "collab-persistence",
+ "collab-sync",
+ "tracing",
+ "y-sync",
+ "yrs",
+]
+
+[[package]]
+name = "collab-sync"
+version = "0.1.0"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f66084#f66084454c143418cf69155dc8cce77df2d57d0c"
+dependencies = [
+ "bytes",
+ "collab",
+ "futures-util",
+ "lib0",
+ "md5",
+ "parking_lot 0.12.1",
+ "serde",
+ "serde_json",
+ "thiserror",
+ "tokio",
+ "tokio-stream",
+ "tokio-util",
+ "tracing",
+ "y-sync",
+ "yrs",
+]
+
[[package]]
name = "color_quant"
version = "1.1.0"
@@ -1458,9 +1534,10 @@ dependencies = [
"async-stream",
"bytes",
"chrono",
+ "chrono-tz 0.8.2",
"collab",
"collab-database",
- "collab-persistence",
+ "collab-plugins",
"dashmap",
"database-model",
"fancy-regex 0.10.0",
@@ -1550,7 +1627,7 @@ dependencies = [
"bytes",
"collab",
"collab-document",
- "collab-persistence",
+ "collab-plugins",
"flowy-codegen",
"flowy-derive",
"flowy-error",
@@ -1600,7 +1677,7 @@ dependencies = [
"chrono",
"collab",
"collab-folder",
- "collab-persistence",
+ "collab-plugins",
"flowy-codegen",
"flowy-derive",
"flowy-document",
@@ -2811,7 +2888,7 @@ dependencies = [
"serde_repr",
"strum_macros",
"tokio",
- "tokio-tungstenite",
+ "tokio-tungstenite 0.15.0",
"tracing",
"url",
]
@@ -3547,6 +3624,15 @@ dependencies = [
"proc-macro-hack",
]
+[[package]]
+name = "phf"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c"
+dependencies = [
+ "phf_shared 0.11.1",
+]
+
[[package]]
name = "phf_codegen"
version = "0.8.0"
@@ -3567,6 +3653,16 @@ dependencies = [
"phf_shared 0.10.0",
]
+[[package]]
+name = "phf_codegen"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a56ac890c5e3ca598bbdeaa99964edb5b0258a583a9eb6ef4e89fc85d9224770"
+dependencies = [
+ "phf_generator 0.11.1",
+ "phf_shared 0.11.1",
+]
+
[[package]]
name = "phf_generator"
version = "0.8.0"
@@ -3587,6 +3683,16 @@ dependencies = [
"rand 0.8.5",
]
+[[package]]
+name = "phf_generator"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1181c94580fa345f50f19d738aaa39c0ed30a600d95cb2d3e23f94266f14fbf"
+dependencies = [
+ "phf_shared 0.11.1",
+ "rand 0.8.5",
+]
+
[[package]]
name = "phf_macros"
version = "0.8.0"
@@ -3634,6 +3740,15 @@ dependencies = [
"uncased",
]
+[[package]]
+name = "phf_shared"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676"
+dependencies = [
+ "siphasher",
+]
+
[[package]]
name = "pin-project"
version = "1.0.12"
@@ -4507,6 +4622,17 @@ dependencies = [
"opaque-debug",
]
+[[package]]
+name = "sha1"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.10.6",
+]
+
[[package]]
name = "sha2"
version = "0.10.6"
@@ -5037,7 +5163,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95a665751302f22a03c56721e23094e4dc22b04a80f381e6737a07bf7a7c70c0"
dependencies = [
"chrono",
- "chrono-tz",
+ "chrono-tz 0.6.1",
"globwalk",
"humansize",
"lazy_static",
@@ -5211,6 +5337,29 @@ dependencies = [
"tokio",
]
+[[package]]
+name = "tokio-retry"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f"
+dependencies = [
+ "pin-project",
+ "rand 0.8.5",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-stream"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842"
+dependencies = [
+ "futures-core",
+ "pin-project-lite",
+ "tokio",
+ "tokio-util",
+]
+
[[package]]
name = "tokio-tungstenite"
version = "0.15.0"
@@ -5221,7 +5370,19 @@ dependencies = [
"log",
"pin-project",
"tokio",
- "tungstenite",
+ "tungstenite 0.14.0",
+]
+
+[[package]]
+name = "tokio-tungstenite"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd"
+dependencies = [
+ "futures-util",
+ "log",
+ "tokio",
+ "tungstenite 0.18.0",
]
[[package]]
@@ -5444,6 +5605,25 @@ dependencies = [
"utf-8",
]
+[[package]]
+name = "tungstenite"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788"
+dependencies = [
+ "base64 0.13.1",
+ "byteorder",
+ "bytes",
+ "http",
+ "httparse",
+ "log",
+ "rand 0.8.5",
+ "sha1",
+ "thiserror",
+ "url",
+ "utf-8",
+]
+
[[package]]
name = "typenum"
version = "1.16.0"
@@ -6221,9 +6401,9 @@ dependencies = [
[[package]]
name = "y-sync"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e77a143afe4dde83bc987ad3119228d0f107053a3da131a00738cb2d7f496641"
+checksum = "f54d34b68ec4514a0659838c2b1ba867c571b20b3804a1338dacf4fa9062d801"
dependencies = [
"lib0",
"thiserror",
diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.toml b/frontend/appflowy_tauri/src-tauri/Cargo.toml
index eb91467934..f304262567 100644
--- a/frontend/appflowy_tauri/src-tauri/Cargo.toml
+++ b/frontend/appflowy_tauri/src-tauri/Cargo.toml
@@ -33,11 +33,12 @@ default = ["custom-protocol"]
custom-protocol = ["tauri/custom-protocol"]
[patch.crates-io]
-collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "46c9a1" }
-collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "46c9a1" }
-collab-persistence = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "46c9a1" }
-collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "46c9a1" }
-collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "46c9a1" }
+collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f66084" }
+collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f66084" }
+collab-persistence = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f66084" }
+collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f66084" }
+collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f66084" }
+collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f66084" }
#collab = { path = "../../AppFlowy-Collab/collab" }
#collab-folder = { path = "../../AppFlowy-Collab/collab-folder" }
diff --git a/frontend/appflowy_tauri/src-tauri/tauri.conf.json b/frontend/appflowy_tauri/src-tauri/tauri.conf.json
index 0a19ba6cc7..7e3af94b5d 100644
--- a/frontend/appflowy_tauri/src-tauri/tauri.conf.json
+++ b/frontend/appflowy_tauri/src-tauri/tauri.conf.json
@@ -1,7 +1,7 @@
{
"build": {
"beforeDevCommand": "npm run dev",
- "beforeBuildCommand": "npm run build",
+ "beforeBuildCommand": "pnpm run build",
"devPath": "http://localhost:1420",
"distDir": "../dist",
"withGlobalTauri": false
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/DateTimeFormat.hooks.ts b/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/DateTimeFormat.hooks.ts
index 918156d404..e024881350 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/DateTimeFormat.hooks.ts
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/DateTimeFormat.hooks.ts
@@ -24,7 +24,9 @@ export const useDateTimeFormat = (cellIdentifier: CellIdentifier, fieldControlle
await changeFormat((option) => (option.time_format = format));
};
const includeTime = async (include: boolean) => {
- await changeFormat((option) => (option.include_time = include));
+ await changeFormat((option) => {
+ // option.include_time = include;
+ });
};
return {
diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/DateTypeOptions.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/DateTypeOptions.tsx
index 086b64594b..9d357ced90 100644
--- a/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/DateTypeOptions.tsx
+++ b/frontend/appflowy_tauri/src/appflowy_app/components/_shared/EditRow/DateTypeOptions.tsx
@@ -76,11 +76,11 @@ export const DateTypeOptions = ({
};
const toggleIncludeTime = async () => {
- if (dateType?.includeTime) {
- await includeTime(false);
- } else {
- await includeTime(true);
- }
+ // if (dateType?.includeTime) {
+ // await includeTime(false);
+ // } else {
+ // await includeTime(true);
+ // }
};
return (
@@ -110,9 +110,9 @@ export const DateTypeOptions = ({
*/}
{t('grid.field.includeTime')}
-
- {dateType?.includeTime ? : }
-
+ {/**/}
+ {/* {dateType?.includeTime ? : }*/}
+ {/**/}