Merge branch 'develop' of github.com:AppFlowy-IO/AppFlowy into refactor-tauri-document

This commit is contained in:
qinluhe 2023-04-11 10:45:11 +08:00
commit d42084f242
458 changed files with 9825 additions and 3845 deletions

View File

@ -0,0 +1,27 @@
<!---
Thank you for submitting a pull request to AppFlowy. The team will dedicate their best efforts to reviewing and approving your pull request. If you have any questions about the project or feedback for us, please join our [Discord](https://discord.gg/wdjWUXXhtw).
-->
<!---
If your pull request adds a new feature, please drag and drop a video into this section to showcase what you've done! If not, you may delete this section.
-->
### Feature Preview
<!---
List at least one issue here that this PR addresses. If it fixes the issue, please use the [fixes](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) keyword to close the issue. For example:
fixes https://github.com/AppFlowy-IO/AppFlowy/pull/2106
-->
---
<!---
Before you mark this PR ready for review, run through this checklist!
-->
#### PR Checklist
- [ ] My code adheres to the [AppFlowy Style Guide](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/style-guides)
- [ ] I've listed at least one issue that this PR fixes in the description above.
- [ ] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
- [ ] All existing tests are passing.

View File

@ -16,7 +16,7 @@ on:
- "frontend/**" - "frontend/**"
env: env:
FLUTTER_VERSION: "3.3.9" FLUTTER_VERSION: "3.7.5"
RUST_TOOLCHAIN: "1.65" RUST_TOOLCHAIN: "1.65"
jobs: jobs:

View File

@ -35,7 +35,7 @@ jobs:
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
channel: "stable" channel: "stable"
flutter-version: "3.3.9" flutter-version: "3.7.5"
cache: true cache: true
- name: Cache Cargo - name: Cache Cargo
@ -56,15 +56,16 @@ jobs:
- name: Setup Environment - name: Setup Environment
run: | run: |
cargo install --force cargo-make
cargo install --force duckscript_cli
if [ "$RUNNER_OS" == "Linux" ]; then if [ "$RUNNER_OS" == "Linux" ]; then
sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub
sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list
sudo apt-get update sudo apt-get update
sudo apt-get install -y dart curl build-essential libsqlite3-dev libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev sudo apt-get install -y dart curl build-essential libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev
sudo apt-get install keybinder-3.0 sudo apt-get install keybinder-3.0
elif [ "$RUNNER_OS" == "Windows" ]; then elif [ "$RUNNER_OS" == "Windows" ]; then
vcpkg integrate install vcpkg integrate install
cargo install --force duckscript_cli
elif [ "$RUNNER_OS" == "macOS" ]; then elif [ "$RUNNER_OS" == "macOS" ]; then
echo 'do nothing' echo 'do nothing'
fi fi
@ -77,17 +78,6 @@ jobs:
cargo install cargo-make cargo install cargo-make
cargo make appflowy-flutter-deps-tools cargo make appflowy-flutter-deps-tools
- name: Build Test lib
working-directory: frontend
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
cargo make --profile production-linux-x86_64 appflowy
elif [ "$RUNNER_OS" == "macOS" ]; then
cargo make --profile production-mac-x86_64 appflowy
elif [ "$RUNNER_OS" == "Windows" ]; then
cargo make --profile production-windows-x86 appflowy
fi
- name: Config Flutter - name: Config Flutter
run: | run: |
if [ "$RUNNER_OS" == "Linux" ]; then if [ "$RUNNER_OS" == "Linux" ]; then
@ -99,22 +89,27 @@ jobs:
fi fi
shell: bash shell: bash
- name: Flutter Code Generation - name: Build Test lib
working-directory: frontend/appflowy_flutter working-directory: frontend
run: | run: |
flutter packages pub get if [ "$RUNNER_OS" == "Linux" ]; then
flutter packages pub run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations -s en.json cargo make --profile development-linux-x86_64 appflowy-dev
flutter packages pub run build_runner build --delete-conflicting-outputs elif [ "$RUNNER_OS" == "macOS" ]; then
cargo make --profile development-mac-x86_64 appflowy-dev
elif [ "$RUNNER_OS" == "Windows" ]; then
cargo make --profile development-windows-x86 appflowy-dev
fi
shell: bash
- name: Run AppFlowy tests - name: Run AppFlowy tests
working-directory: frontend/appflowy_flutter working-directory: frontend/appflowy_flutter
run: | run: |
if [ "$RUNNER_OS" == "Linux" ]; then if [ "$RUNNER_OS" == "Linux" ]; then
flutter test integration_test -d Linux --coverage flutter test integration_test/runner.dart -d Linux --coverage
elif [ "$RUNNER_OS" == "macOS" ]; then elif [ "$RUNNER_OS" == "macOS" ]; then
flutter test integration_test -d macOS --coverage flutter test integration_test/runner.dart -d macOS --coverage
elif [ "$RUNNER_OS" == "Windows" ]; then elif [ "$RUNNER_OS" == "Windows" ]; then
flutter test integration_test -d Windows --coverage flutter test integration_test/runner.dart -d Windows --coverage
fi fi
shell: bash shell: bash
@ -125,4 +120,3 @@ jobs:
# env_vars: ${{ matrix.os }} # env_vars: ${{ matrix.os }}
# fail_ci_if_error: true # fail_ci_if_error: true
# verbose: true # verbose: true

View File

@ -3,10 +3,10 @@ name: release
on: on:
push: push:
tags: tags:
- '*' - "*"
env: env:
FLUTTER_VERSION: "3.3.9" FLUTTER_VERSION: "3.7.5"
RUST_TOOLCHAIN: "1.65" RUST_TOOLCHAIN: "1.65"
jobs: jobs:
@ -136,7 +136,11 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
job: job:
- { target: x86_64-apple-darwin, os: macos-10.15, extra-build-args: "" } - {
target: x86_64-apple-darwin,
os: macos-10.15,
extra-build-args: "",
}
steps: steps:
- name: Checkout source code - name: Checkout source code
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -172,7 +176,7 @@ jobs:
working-directory: frontend working-directory: frontend
run: | run: |
flutter config --enable-macos-desktop flutter config --enable-macos-desktop
cargo make --env APP_VERSION=${{ github.ref_name }} --profile production-mac-x86_64 appflowy dart ./scripts/flutter_release_build/build_flowy.dart . ${{ github.ref_name }}
- name: Create macOS dmg - name: Create macOS dmg
run: | run: |
@ -225,9 +229,21 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
job: job:
- { arch: x86_64, target: x86_64-unknown-linux-gnu, os: ubuntu-20.04, extra-build-args: "", flutter_profile: production-linux-x86_64 } - {
arch: x86_64,
target: x86_64-unknown-linux-gnu,
os: ubuntu-20.04,
extra-build-args: "",
flutter_profile: production-linux-x86_64,
}
# - { arch: aarch64, target: aarch64-unknown-linux-gnu, os: ubuntu-20.04, extra-build-args: "", flutter_profile: production-linux-aarch64 } # - { arch: aarch64, target: aarch64-unknown-linux-gnu, os: ubuntu-20.04, extra-build-args: "", flutter_profile: production-linux-aarch64 }
- { arch: x86_64, target: x86_64-unknown-linux-gnu, os: ubuntu-18.04, extra-build-args: "", flutter_profile: production-linux-x86_64} - {
arch: x86_64,
target: x86_64-unknown-linux-gnu,
os: ubuntu-18.04,
extra-build-args: "",
flutter_profile: production-linux-x86_64,
}
steps: steps:
- name: Checkout source code - name: Checkout source code
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -275,7 +291,7 @@ jobs:
working-directory: frontend working-directory: frontend
run: | run: |
flutter config --enable-linux-desktop flutter config --enable-linux-desktop
cargo make --env APP_VERSION=${{ github.ref_name }} --profile ${{ matrix.job.flutter_profile}} appflowy dart ./scripts/flutter_release_build/build_flowy.dart . ${{ github.ref_name }}
- name: Archive Assert - name: Archive Assert
working-directory: ${{ env.LINUX_APP_RELEASE_PATH }} working-directory: ${{ env.LINUX_APP_RELEASE_PATH }}
@ -324,6 +340,7 @@ jobs:
with: with:
upload_url: ${{ needs.create-release.outputs.upload_url }} upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ${{ env.LINUX_APP_RELEASE_PATH }}/${{ env.LINUX_PACKAGE_NAME }} asset_path: ${{ env.LINUX_APP_RELEASE_PATH }}/${{ env.LINUX_PACKAGE_NAME }}
asset_name: ${{ env.LINUX_PACKAGE_NAME }} asset_name: ${{ env.LINUX_PACKAGE_NAME }}
asset_content_type: application/octet-stream asset_content_type: application/octet-stream
@ -352,3 +369,12 @@ jobs:
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/appflowy_client:${{ github.ref_name }} tags: ${{ secrets.DOCKER_HUB_USERNAME }}/appflowy_client:${{ github.ref_name }}
cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/af_build_cache:buildcache cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/af_build_cache:buildcache
cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/af_build_cache:buildcache,mode=max cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/af_build_cache:buildcache,mode=max
notify-discord:
runs-on: ubuntu-latest
needs: [build-for-linux, build-for-windows, build-for-macOS]
steps:
- name: Notify Discord
run: |
curl -H "Content-Type: application/json" -d '{"username": "release@appflowy", "content": "🎉 AppFlowy ${{ github.ref_name }} is available. https://github.com/AppFlowy-IO/AppFlowy/releases/tag/'${{ github.ref_name }}'"}' "https://discord.com/api/webhooks/${{ secrets.DISCORD }}"
shell: bash

View File

@ -20,7 +20,7 @@ on:
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: "1.65" RUST_TOOLCHAIN: "1.65"
FLUTTER_VERSION: "3.3.9" FLUTTER_VERSION: "3.7.5"
jobs: jobs:
test-on-ubuntu: test-on-ubuntu:

View File

@ -11,7 +11,7 @@ on:
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
FLUTTER_VERSION: "3.3.9" FLUTTER_VERSION: "3.7.5"
RUST_TOOLCHAIN: "1.65" RUST_TOOLCHAIN: "1.65"
jobs: jobs:

2
.gitignore vendored
View File

@ -35,3 +35,5 @@ pubspec.lock
.githooks/gitlint .githooks/gitlint
.githooks/gitlint.exe .githooks/gitlint.exe
.fvm/ .fvm/
**/AppFlowy-Collab/

View File

@ -1,5 +1,12 @@
# Release Notes # Release Notes
## Version 0.1.2 - 03/28/2023
### Bug Fixes
- Fix: update calendar selected range.
- Fix: duplicate view.
## Version 0.1.1 - 03/21/2023 ## Version 0.1.1 - 03/21/2023
### New features ### New features

View File

@ -44,16 +44,16 @@ You are in charge of your data and customizations.
<p align="center"><img src="https://github.com/AppFlowy-IO/appflowy/blob/main/doc/imgs/howtostar.gif" alt="AppFlowy Github - how to star the repo" width="100%" /></p> <p align="center"><img src="https://github.com/AppFlowy-IO/appflowy/blob/main/doc/imgs/howtostar.gif" alt="AppFlowy Github - how to star the repo" width="100%" /></p>
## Getting Started with development ## Getting Started with development
Please view the [documentation](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy) for OS specific development instructions Please view the [documentation](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy) for OS specific development instructions
## Roadmap ## Roadmap
- [AppFlowy Roadmap ReadMe](https://appflowy.gitbook.io/docs/essential-documentation/roadmap) * [AppFlowy Roadmap ReadMe](https://appflowy.gitbook.io/docs/essential-documentation/roadmap)
- [AppFlowy Public Roadmap](https://github.com/orgs/AppFlowy-IO/projects/5/views/12) * [AppFlowy Public Roadmap](https://github.com/orgs/AppFlowy-IO/projects/5/views/12)
If you'd like to propose a feature, submit a feature request [here](https://github.com/AppFlowy-IO/AppFlowy/issues/new?assignees=&labels=&template=feature_request.yaml&title=%5BFR%5D+) <br/> If you'd like to propose a feature, submit a feature request [here](https://github.com/AppFlowy-IO/AppFlowy/issues/new?assignees=&labels=&template=feature_request.yaml&title=%5BFR%5D+) <br/>
If you'd like to report a bug, submit bug report [here](https://github.com/AppFlowy-IO/AppFlowy/issues/new?assignees=&labels=&template=bug_report.yaml&title=%5BBug%5D+) If you'd like to report a bug, submit a bug report [here](https://github.com/AppFlowy-IO/AppFlowy/issues/new?assignees=&labels=&template=bug_report.yaml&title=%5BBug%5D+)
## **Releases** ## **Releases**
@ -61,37 +61,37 @@ Please see the [changelog](https://www.appflowy.io/whatsnew) for more details ab
## Contributing ## Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**. Please look at [Contributing to AppFlowy](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/contributing-to-appflowy) for details. Contributions make the open-source community a fantastic place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. Please look at [Contributing to AppFlowy](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/contributing-to-appflowy) for details.
If your Pull Request is accepted as it fixes a bug, adds functionality, or makes AppFlowy's codebase significantly easier to use or understand, congratulations! If your administrative and managerial work behind the scenes that sustains the community as a whole, congratulations! You are now an official contributor to AppFlowy. Get in touch with us ([link](https://tally.so/r/mKP5z3)) to receive the very special Contributor T-shirt! If your Pull Request is accepted as it fixes a bug, adds functionality, or makes AppFlowy's codebase significantly easier to use or understand, **Congratulations!** If your administrative and managerial work behind the scenes sustains the community, **Congratulations!** You are now an official contributor to AppFlowy. Get in touch with us ([link](https://tally.so/r/mKP5z3)) to receive the very special Contributor T-shirt!
Proudly wear your T-shirt and show it to us by tagging [@appflowy](https://twitter.com/appflowy) on Twitter. Proudly wear your T-shirt and show it to us by tagging [@appflowy](https://twitter.com/appflowy) on Twitter.
## Join the community to build AppFlowy together
## Join the community to build AppFlowy together!
<a href="https://github.com/AppFlowy-IO/AppFlowy/graphs/contributors"> <a href="https://github.com/AppFlowy-IO/AppFlowy/graphs/contributors">
<img src="https://contrib.rocks/image?repo=AppFlowy-IO/AppFlowy" /> <img src="https://contrib.rocks/image?repo=AppFlowy-IO/AppFlowy" />
</a> </a>
## Why Are We Building This? ## Why Are We Building This?
Notion has been our favorite project and knowledge management tool in recent years because of its aesthetic appeal and functionality. Our team uses it daily, and we are on its paid plan. However, as we all know Notion has its limitations. These include weak data security and poor compatibility with mobile devices. Likewise, alternative collaborative workplace management tools also have their constraints. Notion has been our favourite project and knowledge management tool in recent years because of its aesthetic appeal and functionality. Our team uses it daily, and we are on its paid plan. However, as we all know, Notion has its limitations. These include weak data security and poor compatibility with mobile devices. Likewise, alternative collaborative workplace management tools also have their constraints.
The limitations we encountered using these tools rooted in our past work experience with collaborative productivity tools lead to our firm belief that there is, and will be a glass ceiling on what's possible in the future for tools like Notion. This emanates from these tools probable struggles to scale horizontally at some point. It implies that they will likely be forced to prioritize for a proportion of customers whose needs can be quite different from the rest. While decision-makers want a workplace OS, the truth is that it is not very possible to come up with a one-size fits all solution in such a fragmented market. The limitations we encountered using these tools and our past work experience with collaborative productivity tools have led to our firm belief that there is a glass ceiling on what's possible for these tools in the future. This emanates from the fact that these tools will probably struggle to scale horizontally at some point and be forced to prioritize a proportion of customers whose needs differ from the rest. While decision-makers want a workplace OS, it is impossible to come up with a one-size fits all solution in such a fragmented market.
When a customer's evolving core needs are not satisfied, they either switch to another or build one from the ground up, in-house. Consequently, they either go under another ceiling or buy an expensive ticket to learn a hard lesson. This is a requirement for many resources and expertise, building a reliable and easy-to-use collaborative tool, not to mention the speed and native experience. The same may apply to individual users as well. When a customer's evolving core needs are not satisfied, they either switch to another or build one from the ground up, in-house. Consequently, they either go under another ceiling or buy an expensive ticket to learn a hard lesson. This is a requirement for many resources and expertise, building a reliable and easy-to-use collaborative tool, not to mention the speed and native experience. The same may apply to individual users as well.
All these restrictions necessitate our mission - to make it possible for anyone to create apps that suit their needs well. All these restrictions necessitate our mission - to make it possible for anyone to create apps that suit their needs well.
- To individuals, we would like to offer Notion's functionality along with data security and cross-platform native experience. * To individuals, we would like to offer Notion's functionality, data security, and cross-platform native experience.
- To enterprises and hackers, AppFlowy is dedicated to offering building blocks, that is, collaboration infra services to enable you to make apps on your own. Moreover, you have 100% control of your data. You can design and modify AppFlowy your way, with a single codebase written in Flutter and Rust supporting multiple platforms armed with long-term maintainability. * To enterprises and hackers, AppFlowy is dedicated to offering building blocks and collaboration infra services to enable you to make apps on your own. Moreover, you have 100% control of your data. You can design and modify AppFlowy your way, with a single codebase written in Flutter and Rust supporting multiple platforms armed with long-term maintainability.
We decided to achieve this mission by upholding the three most fundamental values: We decided to achieve this mission by upholding the three most fundamental values:
- Data privacy first * Data privacy first
- Reliable native experience * Reliable native experience
- Community-driven extensibility * Community-driven extensibility
To be honest, we do not claim to outperform Notion in terms of functionality and design, at least for now. Besides, our priority doesn't lie in more functionality at the moment. Instead, we would like to cultivate a community to democratize the knowledge and wheels of making complex workplace management tools, while enabling people and businesses to create beautiful things on their own by equipping them with a versatile toolbox of building blocks. We do not claim to outperform Notion in terms of functionality and design, at least for now. Besides, our priority doesn't lie in more functionality at the moment. Instead, we would like to cultivate a community to democratize the knowledge and wheels of making complex workplace management tools while enabling people and businesses to create beautiful things on their own by equipping them with a versatile toolbox of building blocks.
## License ## License
@ -101,6 +101,6 @@ Distributed under the AGPLv3 License. See [`LICENSE.md`](https://github.com/AppF
Special thanks to these amazing projects which help power AppFlowy.IO: Special thanks to these amazing projects which help power AppFlowy.IO:
- [flutter-quill](https://github.com/singerdmx/flutter-quill) * [flutter-quill](https://github.com/singerdmx/flutter-quill)
- [cargo-make](https://github.com/sagiegurari/cargo-make) * [cargo-make](https://github.com/sagiegurari/cargo-make)
- [contrib.rocks](https://contrib.rocks) * [contrib.rocks](https://contrib.rocks)

View File

@ -12,8 +12,8 @@
"type": "dart", "type": "dart",
"preLaunchTask": "AF: Build Appflowy Core", "preLaunchTask": "AF: Build Appflowy Core",
"env": { "env": {
// "RUST_LOG": "trace", "RUST_LOG": "trace",
"RUST_LOG": "debug" // "RUST_LOG": "debug"
}, },
"cwd": "${workspaceRoot}/appflowy_flutter" "cwd": "${workspaceRoot}/appflowy_flutter"
}, },

View File

@ -1,223 +1,225 @@
{ {
"version": "2.0.0", "version": "2.0.0",
// https://code.visualstudio.com/docs/editor/tasks // https://code.visualstudio.com/docs/editor/tasks
// https://gist.github.com/deadalusai/9e13e36d61ec7fb72148 // https://gist.github.com/deadalusai/9e13e36d61ec7fb72148
// ${workspaceRoot}: the root folder of the team // ${workspaceRoot}: the root folder of the team
// ${file}: the current opened file // ${file}: the current opened file
// ${fileBasename}: the current opened file's basename // ${fileBasename}: the current opened file's basename
// ${fileDirname}: the current opened file's dirname // ${fileDirname}: the current opened file's dirname
// ${fileExtname}: the current opened file's extension // ${fileExtname}: the current opened file's extension
// ${cwd}: the current working directory of the spawned process // ${cwd}: the current working directory of the spawned process
"tasks": [ "tasks": [
{ {
"label": "AF: Clean + Rebuild All", "label": "AF: Clean + Rebuild All",
"type": "shell", "type": "shell",
"dependsOrder": "sequence", "dependsOrder": "sequence",
"dependsOn": [ "dependsOn": [
"AF: Dart Clean", "AF: Dart Clean",
"AF: Flutter Clean", "AF: Flutter Clean",
"AF: Build Appflowy Core", "AF: Build Appflowy Core",
"AF: Flutter Pub Get", "AF: Flutter Pub Get",
"AF: Flutter Package Get", "AF: Flutter Package Get",
"AF: Generate Language Files", "AF: Generate Language Files",
"AF: Generate Freezed Files" "AF: Generate Freezed Files"
], ],
"presentation": { "presentation": {
"reveal": "always", "reveal": "always",
"panel": "new" "panel": "new"
} }
}, },
{ {
"label": "AF: Clean + Rebuild All (Android)", "label": "AF: Clean + Rebuild All (Android)",
"type": "shell", "type": "shell",
"dependsOrder": "sequence", "dependsOrder": "sequence",
"dependsOn": [ "dependsOn": [
"AF: Dart Clean", "AF: Dart Clean",
"AF: Flutter Clean", "AF: Flutter Clean",
"AF: Build Appflowy Core_for_android", "AF: Build Appflowy Core_for_android",
"AF: Flutter Pub Get", "AF: Flutter Pub Get",
"AF: Flutter Package Get", "AF: Flutter Package Get",
"AF: Generate Language Files", "AF: Generate Language Files",
"AF: Generate Freezed Files" "AF: Generate Freezed Files"
], ],
"presentation": { "presentation": {
"reveal": "always", "reveal": "always",
"panel": "new" "panel": "new"
} }
}, },
{ {
"label": "AF: Build Appflowy Core_for_android", "label": "AF: Build Appflowy Core_for_android",
"type": "shell", "type": "shell",
"command": "cargo make --profile development-android appflowy-core-dev-android", "command": "cargo make --profile development-android appflowy-core-dev-android",
"group": "build", "group": "build",
"options": { "options": {
"cwd": "${workspaceFolder}" "cwd": "${workspaceFolder}"
} }
}, },
{ {
"label": "AF: Build Appflowy Core", "label": "AF: Build Appflowy Core",
"type": "shell", "type": "shell",
"windows": { "windows": {
"command": "cargo make --profile development-windows-x86 appflowy-core-dev" "command": "cargo make --profile development-windows-x86 appflowy-core-dev"
}, },
"linux": { "linux": {
"command": "cargo make --profile \"development-linux-$(uname -m)\" appflowy-core-dev" "command": "cargo make --profile \"development-linux-$(uname -m)\" appflowy-core-dev"
}, },
"osx": { "osx": {
"command": "cargo make --profile \"development-mac-$(uname -m)\" appflowy-core-dev" "command": "cargo make --profile \"development-mac-$(uname -m)\" appflowy-core-dev"
}, },
"group": "build", "group": "build",
"options": { "options": {
"cwd": "${workspaceFolder}" "cwd": "${workspaceFolder}"
} }
}, },
{ {
"label": "AF: Code Gen", "label": "AF: Code Gen",
"type": "shell", "type": "shell",
"dependsOrder": "sequence", "dependsOrder": "sequence",
"dependsOn": [ "dependsOn": [
"AF: Flutter Clean", "AF: Flutter Clean",
"AF: Flutter Pub Get", "AF: Flutter Pub Get",
"AF: Flutter Package Get", "AF: Flutter Package Get",
"AF: Generate Language Files", "AF: Generate Language Files",
"AF: Generate Freezed Files" "AF: Generate Freezed Files"
], ],
"group": { "group": {
"kind": "build", "kind": "build",
"isDefault": true "isDefault": true
}, },
"presentation": { "presentation": {
"reveal": "always", "reveal": "always",
"panel": "new" "panel": "new"
} }
}, },
{ {
"label": "AF: Flutter Clean", "label": "AF: Flutter Clean",
"type": "shell", "type": "shell",
"command": "flutter clean", "command": "flutter clean",
"options": { "options": {
"cwd": "${workspaceFolder}/appflowy_flutter" "cwd": "${workspaceFolder}/appflowy_flutter"
} }
}, },
{ {
"label": "AF: Flutter Pub Get", "label": "AF: Flutter Pub Get",
"type": "shell", "type": "shell",
"command": "flutter pub get", "command": "flutter pub get",
"options": { "options": {
"cwd": "${workspaceFolder}/appflowy_flutter" "cwd": "${workspaceFolder}/appflowy_flutter"
} }
}, },
{ {
"label": "AF: Flutter Package Get", "label": "AF: Flutter Package Get",
"type": "shell", "type": "shell",
"command": "flutter packages pub get", "command": "flutter packages pub get",
"options": { "options": {
"cwd": "${workspaceFolder}/appflowy_flutter" "cwd": "${workspaceFolder}/appflowy_flutter"
} }
}, },
{ {
"label": "AF: Generate Freezed Files", "label": "AF: Generate Freezed Files",
"type": "shell", "type": "shell",
"command": "flutter pub run build_runner build --delete-conflicting-outputs", "command": "flutter pub run build_runner build --delete-conflicting-outputs",
"options": { "options": {
"cwd": "${workspaceFolder}/appflowy_flutter" "cwd": "${workspaceFolder}/appflowy_flutter"
} }
}, },
{ {
"label": "AF: Generate Language Files", "label": "AF: Generate Language Files",
"type": "shell", "type": "shell",
"command": "sh ./scripts/generate_language_files.sh", "command": "sh ./scripts/generate_language_files.sh",
"windows": { "windows": {
"options": { "options": {
"shell": { "shell": {
"executable": "cmd.exe", "executable": "cmd.exe",
"args": [ "args": [
"/d", "/d",
"/c", "/c",
".\\scripts\\generate_language_files.cmd" ".\\scripts\\generate_language_files.cmd"
] ]
} }
} }
}, },
"group": "build", "group": "build",
"options": { "options": {
"cwd": "${workspaceFolder}" "cwd": "${workspaceFolder}"
} }
}, },
{ {
"label": "AF: Flutter Clean", "label": "AF: Flutter Clean",
"type": "shell", "type": "shell",
"command": "cargo make flutter_clean", "command": "cargo make flutter_clean",
"group": "build", "group": "build",
"options": { "options": {
"cwd": "${workspaceFolder}" "cwd": "${workspaceFolder}"
} }
}, },
{ {
"label": "AF: flutter build aar", "label": "AF: flutter build aar",
"type": "flutter", "type": "flutter",
"command": "flutter", "command": "flutter",
"args": [ "args": [
"build", "build",
"aar" "aar"
], ],
"group": "build", "group": "build",
"problemMatcher": [], "problemMatcher": [],
"detail": "appflowy_flutter" "detail": "appflowy_flutter"
}, },
{ {
"label": "AF: Tauri UI Dev", "label": "AF: Tauri UI Dev",
"type": "shell", "type": "shell",
"isBackground": true, "isBackground": true,
"command": "yarn", "command": "yarn",
"args": ["dev"], "args": [
"options": { "dev"
"cwd": "${workspaceFolder}/appflowy_tauri" ],
} "options": {
}, "cwd": "${workspaceFolder}/appflowy_tauri"
{ }
"label": "AF: Tauri UI Build", },
"type": "shell", {
"command": "npm run build", "label": "AF: Tauri UI Build",
"options": { "type": "shell",
"cwd": "${workspaceFolder}/appflowy_tauri" "command": "npm run build",
} "options": {
}, "cwd": "${workspaceFolder}/appflowy_tauri"
{ }
"label": "AF: Tauri Dev", },
"type": "shell", {
"command": "npm run tauri:dev", "label": "AF: Tauri Dev",
"options": { "type": "shell",
"cwd": "${workspaceFolder}/appflowy_tauri" "command": "npm run tauri:dev",
} "options": {
}, "cwd": "${workspaceFolder}/appflowy_tauri"
{ }
"label": "AF: Tauri Clean", },
"type": "shell", {
"command": "cargo make tauri_clean", "label": "AF: Tauri Clean",
"options": { "type": "shell",
"cwd": "${workspaceFolder}" "command": "cargo make tauri_clean",
} "options": {
}, "cwd": "${workspaceFolder}"
{ }
"label": "AF: Tauri Clean + Dev", },
"type": "shell", {
"dependsOrder": "sequence", "label": "AF: Tauri Clean + Dev",
"dependsOn": [ "type": "shell",
"AF: Tauri Clean", "dependsOrder": "sequence",
"AF: Tauri UI Dev" "dependsOn": [
], "AF: Tauri Clean",
"options": { "AF: Tauri UI Dev"
"cwd": "${workspaceFolder}" ],
} "options": {
}, "cwd": "${workspaceFolder}"
{ }
"label": "AF: Tauri ESLint", },
"type": "shell", {
"command": "npx eslint --fix src", "label": "AF: Tauri ESLint",
"options": { "type": "shell",
"cwd": "${workspaceFolder}/appflowy_tauri" "command": "npx eslint --fix src",
} "options": {
}, "cwd": "${workspaceFolder}/appflowy_tauri"
] }
} },
]
}

View File

@ -23,7 +23,7 @@ CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
CARGO_MAKE_CRATE_FS_NAME = "dart_ffi" CARGO_MAKE_CRATE_FS_NAME = "dart_ffi"
CARGO_MAKE_CRATE_NAME = "dart-ffi" CARGO_MAKE_CRATE_NAME = "dart-ffi"
LIB_NAME = "dart_ffi" LIB_NAME = "dart_ffi"
CURRENT_APP_VERSION = "0.1.1" CURRENT_APP_VERSION = "0.1.2"
FLUTTER_DESKTOP_FEATURES = "dart,rev-sqlite" FLUTTER_DESKTOP_FEATURES = "dart,rev-sqlite"
PRODUCT_NAME = "AppFlowy" PRODUCT_NAME = "AppFlowy"
# CRATE_TYPE: https://doc.rust-lang.org/reference/linkage.html # CRATE_TYPE: https://doc.rust-lang.org/reference/linkage.html

View File

@ -40,7 +40,7 @@ lib/generated_plugin_registrant.dart
lib/generated/ lib/generated/
# Freezed generated files # Freezed generated files
*.g.dart *.g.dart
*.freezed.dart *.freezed.dart
# Symbolication related # Symbolication related
@ -67,4 +67,4 @@ windows/flutter/dart_ffi/
**/**/*.so **/**/*.so
**/**/Brewfile.lock.json **/**/Brewfile.lock.json
**/.sandbox **/.sandbox
**/.vscode/ **/.vscode/

View File

@ -1,6 +1,6 @@
<h1 align="center" style="margin:0"> AppFlowy_Flutter</h1> <h1 align="center" style="margin:0"> AppFlowy_Flutter</h1>
<div align="center"> <div align="center">
<img src="https://img.shields.io/badge/Flutter-v3.3.10-blue"/> <img src="https://img.shields.io/badge/Flutter-v3.7.5-blue"/>
<img src="https://img.shields.io/badge/Rust-v1.65-orange"/> <img src="https://img.shields.io/badge/Rust-v1.65-orange"/>
</div> </div>
@ -9,13 +9,16 @@
This Repository contains the codebase for the frontend of the application, currently we use Flutter as our frontend framework. This Repository contains the codebase for the frontend of the application, currently we use Flutter as our frontend framework.
### Platforms Supported Using Flutter 💻 ### Platforms Supported Using Flutter 💻
- Linux - Linux
- macOS - macOS
- Windows - Windows
> We later expect to extend support to Android and iOS devices using Flutter. > We later expect to extend support to Android and iOS devices using Flutter.
### Am I Eligible to Contribute? ### Am I Eligible to Contribute?
Yes! You are eligible to contribute, check out the ways in which you can [contribute to AppFlowy](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/contributing-to-appflowy). Some of the ways in which you can contribute are: Yes! You are eligible to contribute, check out the ways in which you can [contribute to AppFlowy](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/contributing-to-appflowy). Some of the ways in which you can contribute are:
- Non-Coding Contributions - Non-Coding Contributions
- Documentation - Documentation
- Feature Requests and Feedbacks - Feature Requests and Feedbacks
@ -23,26 +26,27 @@ Yes! You are eligible to contribute, check out the ways in which you can [contri
- Improve Translations - Improve Translations
- Coding Contributions - Coding Contributions
To contribute to `AppFlowy_Flutter` codebase specifically (coding contribution) we suggest you to have basic knowledge of Flutter. In case you are new to Flutter, we may suggest you to learn the basics and then try to contribute, get started with Flutter [here](https://flutter.dev/docs/get-started/codelab). To contribute to `AppFlowy_Flutter` codebase specifically (coding contribution) we suggest you to have basic knowledge of Flutter. In case you are new to Flutter, we may suggest you to learn the basics and then try to contribute, get started with Flutter [here](https://flutter.dev/docs/get-started/codelab).
### What OS Should I Use for Development? ### What OS Should I Use for Development?
We support all OS for Development i.e Linux, macOS and Windows. However, most of us promote macOS and Linux over Windows. We have detailed [docs](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/environment-setup) on How to Setup `AppFlowy_Flutter` in your local system in each OS. We support all OS for Development i.e Linux, macOS and Windows. However, most of us promote macOS and Linux over Windows. We have detailed [docs](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/environment-setup) on How to Setup `AppFlowy_Flutter` in your local system in each OS.
### Getting Started ❇ ### Getting Started ❇
We have a detailed documentation, on how to [get started](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/contributing-to-appflowy) with the project, and make your first contribution. However, we do have some specific picks for you. We have a detailed documentation, on how to [get started](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/contributing-to-appflowy) with the project, and make your first contribution. However, we do have some specific picks for you.
- [Code Architecture](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/architecture/frontend/frontend/codemap) - [Code Architecture](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/architecture/frontend/frontend/codemap)
- [Making Your First PR](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/submitting-your-first-pull-request) - [Making Your First PR](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/submitting-your-first-pull-request)
- [The Style Guide](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/style-guides) - [The Style Guide](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/style-guides)
- [How to run/debug the application](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/launcher-and-tasks) - [How to run/debug the application](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/launcher-and-tasks)
### Need Help? ### Need Help?
- New to GitHub? Follow [these](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/setting-up-your-repositories) steps to get started - New to GitHub? Follow [these](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/setting-up-your-repositories) steps to get started
- Stuck Somewhere? Join the [Discord](https://discord.gg/9Q2xaN37tV) Group and we are there to help you! - Stuck Somewhere? Join the [Discord](https://discord.gg/9Q2xaN37tV) Group and we are there to help you!
<!-- <!--
## release check ## release check
1. [entitlements](https://flutter.dev/desktop#setting-up-entitlements) 1. [entitlements](https://flutter.dev/desktop#setting-up-entitlements)
2. [symbols stripped](https://flutter.dev/docs/development/platform-integration/c-interop) --> 2. [symbols stripped](https://flutter.dev/docs/development/platform-integration/c-interop) -->

View File

@ -1,5 +1,17 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg
<rect width="16" height="16" rx="8" fill="#00BCF0"/> width="16"
<rect x="7.5" y="4" width="1" height="8" rx="0.5" fill="white"/> height="16"
<rect x="12" y="7.5" width="1" height="8" rx="0.5" transform="rotate(90 12 7.5)" fill="white"/> viewBox="0 0 16 16"
fill="none"
version="1.1"
id="svg808"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs812" />
<path
id="path930"
style="fill:#00bcf0;fill-opacity:1"
transform="rotate(-90)"
d="M 0,7.9238281 A 8,8 0 0 0 -8.0585938,0 8,8 0 0 0 -16,8.0390625 8,8 0 0 0 -7.9804688,16 8,8 0 0 0 0,8 Z M -4,8 c 0,0.2769988 -0.2230012,0.5 -0.5,0.5 h -3 v 3 c 0,0.277 -0.2230012,0.5 -0.5,0.5 -0.2769988,0 -0.5,-0.223 -0.5,-0.5 v -3 h -3 C -11.777,8.5 -12,8.2769988 -12,8 c 0,-0.2769988 0.223,-0.5 0.5,-0.5 h 3 v -3 C -8.5,4.2230012 -8.2769988,4 -8,4 c 0.2769988,0 0.5,0.2230012 0.5,0.5 v 3 h 3 C -4.2230012,7.5 -4,7.7230012 -4,8 Z" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 317 B

After

Width:  |  Height:  |  Size: 766 B

View File

@ -188,17 +188,18 @@
"exportDatabase": "Export database", "exportDatabase": "Export database",
"selectFiles": "Select the files that need to be export", "selectFiles": "Select the files that need to be export",
"createNewFolder": "Create a new folder", "createNewFolder": "Create a new folder",
"createNewFolderDesc": "Tell us where you want to store your data ...", "createNewFolderDesc": "Tell us where you want to store your data",
"open": "Open", "open": "Open",
"openFolder": "Open an existing folder", "openFolder": "Open an existing folder",
"openFolderDesc": "Read and write it to your existing AppFlowy folder ...", "openFolderDesc": "Read and write it to your existing AppFlowy folder",
"folderHintText": "folder name", "folderHintText": "folder name",
"location": "Creating a new folder", "location": "Creating a new folder",
"locationDesc": "Pick a name for your AppFlowy data folder", "locationDesc": "Pick a name for your AppFlowy data folder",
"browser": "Browse", "browser": "Browse",
"create": "Create", "create": "Create",
"folderPath": "Path to store your folder", "folderPath": "Path to store your folder",
"locationCannotBeEmpty": "Path cannot be empty" "locationCannotBeEmpty": "Path cannot be empty",
"pathCopiedSnackbar": "File storage path copied to clipboard!"
}, },
"user": { "user": {
"name": "Name", "name": "Name",
@ -325,7 +326,8 @@
"checklist": { "checklist": {
"panelTitle": "Add an item" "panelTitle": "Add an item"
}, },
"menuName": "Grid" "menuName": "Grid",
"referencedGridPrefix": "View of"
}, },
"document": { "document": {
"menuName": "Document", "menuName": "Document",
@ -365,6 +367,7 @@
"changeCover": "Change Cover", "changeCover": "Change Cover",
"colors": "Colors", "colors": "Colors",
"images": "Images", "images": "Images",
"clearAll": "Clear All",
"abstract": "Abstract", "abstract": "Abstract",
"addCover": "Add Cover", "addCover": "Add Cover",
"addLocalImage": "Add local image", "addLocalImage": "Add local image",
@ -382,14 +385,14 @@
"imageSavingFailed": "Image Saving Failed", "imageSavingFailed": "Image Saving Failed",
"addIcon": "Add Icon" "addIcon": "Add Icon"
} }
} }
}, },
"board": { "board": {
"column": { "column": {
"create_new_card": "New" "create_new_card": "New"
}, },
"menuName": "Board" "menuName": "Board",
"referencedBoardPrefix": "View of"
}, },
"calendar": { "calendar": {
"menuName": "Calendar", "menuName": "Calendar",

View File

@ -40,6 +40,13 @@
"markdown": "Markdown", "markdown": "Markdown",
"copyLink": "複製連結" "copyLink": "複製連結"
}, },
"moreAction": {
"small": "小",
"medium": "中",
"large": "大",
"fontSize": "字體大小",
"import": "匯入"
},
"disclosureAction": { "disclosureAction": {
"rename": "重新命名", "rename": "重新命名",
"delete": "刪除", "delete": "刪除",
@ -64,6 +71,7 @@
}, },
"dialogCreatePageNameHint": "頁面名稱", "dialogCreatePageNameHint": "頁面名稱",
"questionBubble": { "questionBubble": {
"shortcuts": "快捷鍵",
"whatsNew": "新功能", "whatsNew": "新功能",
"help": "幫助 & 支援", "help": "幫助 & 支援",
"debug": { "debug": {
@ -90,11 +98,21 @@
"inlineCode": "程式碼", "inlineCode": "程式碼",
"quote": "區塊引言", "quote": "區塊引言",
"header": "標題", "header": "標題",
"highlight": "反白" "highlight": "反白",
"color": "顏色"
}, },
"tooltip": { "tooltip": {
"lightMode": "切換至亮色模式", "lightMode": "切換至亮色模式",
"darkMode": "切換至暗色模式" "darkMode": "切換至暗色模式",
"openAsPage": "以頁面開啓",
"addNewRow": "新增列表",
"openMenu": "點擊開啓選單",
"viewDataBase": "查看資料庫",
"referencePage": "這個 {name} 已參照"
},
"sideBar": {
"closeSidebar": "關閉側邊欄",
"openSidebar": "開啓側邊欄"
}, },
"notifications": { "notifications": {
"export": { "export": {
@ -114,7 +132,14 @@
"signIn": "登入", "signIn": "登入",
"signOut": "登出", "signOut": "登出",
"complete": "完成", "complete": "完成",
"save": "儲存" "save": "儲存",
"generate": "產生",
"esc": "離開",
"keep": "保存",
"tryAgain": "再試一次",
"discard": "放棄變更",
"replace": "取代",
"insertBelow": "在下面插入"
}, },
"label": { "label": {
"welcome": "歡迎!", "welcome": "歡迎!",
@ -142,22 +167,99 @@
"appearance": "外觀", "appearance": "外觀",
"language": "語言", "language": "語言",
"user": "使用者", "user": "使用者",
"files": "檔案",
"open": "開啟設定" "open": "開啟設定"
}, },
"appearance": { "appearance": {
"themeMode": { "themeMode": {
"label": "Theme Mode", "label": "主題模式",
"light": "亮色模式", "light": "亮色模式",
"dark": "暗色模式", "dark": "暗色模式",
"system": "Adapt to System" "system": "系統設定"
} },
"theme": "主題"
},
"files": {
"defaultLocation": "Appflowy 資料儲存位置",
"doubleTapToCopy": "雙擊以複製路徑",
"restoreLocation": "回復 Appflowy 預設路徑",
"customizeLocation": "開啓其他資料夾",
"restartApp": "請重新啓動以讓更動生效",
"exportDatabase": "匯出資料庫",
"selectFiles": "選擇需要匯出的檔案",
"createNewFolder": "建立新檔案",
"createNewFolderDesc": "選擇你想儲存資料的位置",
"open": "打開",
"openFolder": "開啓一個已經存在的資料夾",
"openFolderDesc": "讀寫已存在的 AppFlowy 資料夾",
"folderHintText": "資料夾名稱",
"location": "建立新資料夾",
"locationDesc": "命名 Appflowy 資料夾",
"browser": "瀏覽",
"create": "建立",
"folderPath": "儲存資料夾的路徑",
"locationCannotBeEmpty": "路徑不能爲空",
"pathCopiedSnackbar": "檔案儲存空間的路徑已被複製到剪貼簿!"
},
"user": {
"name": "名稱",
"icon": "圖標",
"selectAnIcon": "選擇圖標",
"pleaseInputYourOpenAIKey": "請輸入你的 OpenAI 密鑰"
} }
}, },
"grid": { "grid": {
"settings": { "settings": {
"filter": "篩選", "filter": "篩選",
"sort": "排序",
"sortBy": "排序方式", "sortBy": "排序方式",
"Properties": "內容" "Properties": "內容",
"group": "群組",
"addFilter": "增加",
"deleteFilter": "刪除篩選器",
"filterBy": "以...篩選",
"typeAValue": "輸入一個值...",
"layout": "佈局"
},
"textFilter": {
"contains": "包含",
"doesNotContain": "不包含",
"endsWith": "以...結尾",
"startWith": "以...開頭",
"is": "是",
"isNot": "不是",
"isEmpty": "爲空",
"isNotEmpty": "不爲空",
"choicechipPrefix": {
"isNot": "不是",
"startWith": "以...開頭",
"endWith": "以...結尾",
"isEmpty": "爲空",
"isNotEmpty": "不爲空"
}
},
"checkboxFilter": {
"isChecked": "已核取",
"isUnchecked": "未核取",
"choicechipPrefix": {
"is": "是"
}
},
"checklistFilter": {
"isComplete": "已完成",
"isIncomplted": "未完成"
},
"singleSelectOptionFilter": {
"is": "是",
"isNot": "不是",
"isEmpty": "爲空",
"isNotEmpty": "不爲空"
},
"multiSelectOptionFilter": {
"contains": "包含",
"doesNotContain": "不包含",
"isEmpty": "爲空",
"isNotEmpty": "不爲空"
}, },
"field": { "field": {
"hide": "隱藏", "hide": "隱藏",
@ -172,6 +274,7 @@
"singleSelectFieldName": "單選", "singleSelectFieldName": "單選",
"multiSelectFieldName": "多選", "multiSelectFieldName": "多選",
"urlFieldName": "網址", "urlFieldName": "網址",
"checklistFieldName": "核取列表",
"numberFormat": "數字格式", "numberFormat": "數字格式",
"dateFormat": "日期格式", "dateFormat": "日期格式",
"includeTime": "包含時間", "includeTime": "包含時間",
@ -186,13 +289,23 @@
"addSelectOption": "新增選項", "addSelectOption": "新增選項",
"optionTitle": "選項", "optionTitle": "選項",
"addOption": "新增選項", "addOption": "新增選項",
"editProperty": "編輯內容" "editProperty": "編輯內容",
"newColumn": "新欄位",
"deleteFieldPromptMessage": "你確定嗎?這個內容將被刪除"
},
"sort": {
"ascending": "升冪排序",
"descending": "降冪排序",
"deleteSort": "刪除排序",
"addSort": "新增排序"
}, },
"row": { "row": {
"duplicate": "複製", "duplicate": "複製",
"delete": "刪除", "delete": "刪除",
"textPlaceholder": "空", "textPlaceholder": "空",
"copyProperty": "已將內容複製至剪貼簿" "copyProperty": "已將內容複製至剪貼簿",
"count": "Count",
"newRow": "新列表"
}, },
"selectOption": { "selectOption": {
"create": "建立", "create": "建立",
@ -210,6 +323,9 @@
"panelTitle": "搜尋或建立選項", "panelTitle": "搜尋或建立選項",
"searchOption": "搜尋選項" "searchOption": "搜尋選項"
}, },
"checklist": {
"panelTitle": "新增物件"
},
"menuName": "網格" "menuName": "網格"
}, },
"document": { "document": {
@ -217,10 +333,78 @@
"date": { "date": {
"timeHintTextInTwelveHour": "01:00 PM", "timeHintTextInTwelveHour": "01:00 PM",
"timeHintTextInTwentyFourHour": "13:00" "timeHintTextInTwentyFourHour": "13:00"
},
"slashMenu": {
"board": {
"selectABoardToLinkTo": "選擇要連結的看板",
"createANewBoard": "建立新的看板"
},
"grid": {
"selectAGridToLinkTo": "選擇要連結的網格",
"createANewGrid": "建立新網格"
}
},
"plugins": {
"referencedBoard": "已參照的看板",
"referencedGrid": "已參照的網格",
"autoGeneratorMenuItemName": "OpenAI 寫手",
"autoGeneratorTitleName": "OpenAI: 叫人工智慧寫下任何事情...",
"autoGeneratorLearnMore": "Learn more",
"autoGeneratorGenerate": "產生",
"autoGeneratorHintText": "問 OpenAI ...",
"autoGeneratorCantGetOpenAIKey": "無法取得 OpenAI 密鑰",
"smartEdit": "人工智慧助理",
"openAI": "OpenAI",
"smartEditFixSpelling": "修正拼寫",
"warning": "⚠️ AI 的回答可能不精確或是存在誤導",
"smartEditSummarize": "總結",
"smartEditCouldNotFetchResult": "無法取得 OpenAI 的結果",
"smartEditCouldNotFetchKey": "無法取得 OpenAI 密鑰",
"smartEditDisabled": "在設定連結 OpenAI ",
"discardResponse": "你確定放棄人工智慧的回覆?",
"cover": {
"changeCover": "更換封面",
"colors": "顏色",
"images": "圖片",
"abstract": "摘要",
"addCover": "新增封面",
"addLocalImage": "新增本機圖片",
"invalidImageUrl": "無效的圖片網址",
"failedToAddImageToGallery": "新增圖片到圖庫失敗",
"enterImageUrl": "輸入圖片網址",
"add": "Add",
"back": "Back",
"saveToGallery": "儲存到",
"removeIcon": "移除圖標",
"pasteImageUrl": "複製圖片網址",
"or": "或",
"pickFromFiles": "挑選檔案",
"couldNotFetchImage": "無法截取圖片",
"imageSavingFailed": "圖片儲存失敗",
"addIcon": "新增圖標"
}
} }
}, },
"sideBar": { "board": {
"openSidebar": "Open sidebar", "column": {
"closeSidebar": "Close sidebar" "create_new_card": "建立"
},
"menuName": "看板"
},
"calendar": {
"menuName": "日曆",
"defaultNewCalendarTitle": "未命名的",
"navigation": {
"today": "今天",
"jumpToday": "跳至今天",
"previousMonth": "上個月",
"nextMonth": "下個月"
},
"settings": {
"showWeekNumbers": "顯示星期",
"showWeekends": "顯示週末",
"firstDayOfWeek": "一週的第一天",
"layoutDateField": "排列方式"
}
} }
} }

View File

@ -0,0 +1,43 @@
import 'package:appflowy_board/appflowy_board.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'util/util.dart';
/// Integration tests for an empty board. The [TestWorkspaceService] will load
/// a workspace from an empty board `assets/test/workspaces/board.zip` for all
/// tests.
///
/// To create another integration test with a preconfigured workspace.
/// Use the following steps.
/// 1. Create a new workspace from the AppFlowy launch screen.
/// 2. Modify the workspace until it is suitable as the starting point for
/// the integration test you need to land.
/// 3. Use a zip utility program to zip the workspace folder that you created.
/// 4. Add the zip file under `assets/test/workspaces/`
/// 5. Add a new enumeration to [TestWorkspace] in `integration_test/utils/data.dart`.
/// For example, if you added a workspace called `empty_calendar.zip`,
/// then [TestWorkspace] should have the following value:
/// ```dart
/// enum TestWorkspace {
/// board('board'),
/// empty_calendar('empty_calendar');
///
/// /* code */
/// }
/// ```
/// 6. Double check that the .zip file that you added is included as an asset in
/// the pubspec.yaml file under appflowy_flutter.
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
const service = TestWorkspaceService(TestWorkspace.board);
group('board', () {
setUpAll(() async => await service.setUpAll());
setUp(() async => await service.setUp());
testWidgets('integration test unzips the proper workspace and loads it correctly.', (tester) async {
await tester.initializeAppFlowy();
expect(find.byType(AppFlowyBoard), findsOneWidget);
});
});
}

View File

@ -0,0 +1,120 @@
import 'package:appflowy/plugins/document/presentation/plugins/base/built_in_page_widget.dart';
import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'util/keyboard.dart';
import 'util/util.dart';
/// Integration tests for an empty document. The [TestWorkspaceService] will load a workspace from an empty document `assets/test/workspaces/empty_document.zip` for all tests.
///
/// To create another integration test with a preconfigured workspace. Use the following steps:
/// 1. Create a new workspace from the AppFlowy launch screen.
/// 2. Modify the workspace until it is suitable as the starting point for the integration test you need to land.
/// 3. Use a zip utility program to zip the workspace folder that you created.
/// 4. Add the zip file under `assets/test/workspaces/`
/// 5. Add a new enumeration to [TestWorkspace] in `integration_test/utils/data.dart`. For example, if you added a workspace called `empty_calendar.zip`, then [TestWorkspace] should have the following value:
/// ```dart
/// enum TestWorkspace {
/// board('board'),
/// empty_calendar('empty_calendar');
///
/// /* code */
/// }
/// ```
/// 6. Double check that the .zip file that you added is included as an asset in the pubspec.yaml file under appflowy_flutter.
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
const service = TestWorkspaceService(TestWorkspace.emptyDocument);
group('Tests on a workspace with only an empty document', () {
setUpAll(() async => await service.setUpAll());
setUp(() async => await service.setUp());
testWidgets('/board shortcut creates a new board and view of the board', (tester) async {
await tester.initializeAppFlowy();
// Needs tab to obtain focus for the app flowy editor.
// by default the tap appears at the center of the widget.
final Finder editor = find.byType(AppFlowyEditor);
await tester.tap(editor);
await tester.pumpAndSettle();
// tester.sendText() cannot be used since the editor
// does not contain any EditableText widgets.
// to interact with the app during an integration test,
// simulate physical keyboard events.
await FlowyTestKeyboard.simulateKeyDownEvent([
LogicalKeyboardKey.slash,
LogicalKeyboardKey.keyB,
LogicalKeyboardKey.keyO,
LogicalKeyboardKey.keyA,
LogicalKeyboardKey.keyR,
LogicalKeyboardKey.keyD,
LogicalKeyboardKey.arrowDown,
], tester: tester);
// Checks whether the options in the selection menu
// for /board exist.
expect(find.byType(SelectionMenuItemWidget), findsAtLeastNWidgets(2));
// Finalizes the slash command that creates the board.
await FlowyTestKeyboard.simulateKeyDownEvent([
LogicalKeyboardKey.enter,
], tester: tester);
// Checks whether new board is referenced and properly on the page.
expect(find.byType(BuiltInPageWidget), findsOneWidget);
// Checks whether the new database was created
const newBoardLabel = "Untitled";
expect(find.text(newBoardLabel), findsOneWidget);
// Checks whether a view of the database was created
const viewOfBoardLabel = "View of Untitled";
expect(find.text(viewOfBoardLabel), findsNWidgets(2));
});
testWidgets('/grid shortcut creates a new grid and view of the grid', (tester) async {
await tester.initializeAppFlowy();
// Needs tab to obtain focus for the app flowy editor.
// by default the tap appears at the center of the widget.
final Finder editor = find.byType(AppFlowyEditor);
await tester.tap(editor);
await tester.pumpAndSettle();
// tester.sendText() cannot be used since the editor
// does not contain any EditableText widgets.
// to interact with the app during an integration test,
// simulate physical keyboard events.
await FlowyTestKeyboard.simulateKeyDownEvent([
LogicalKeyboardKey.slash,
LogicalKeyboardKey.keyG,
LogicalKeyboardKey.keyR,
LogicalKeyboardKey.keyI,
LogicalKeyboardKey.keyD,
LogicalKeyboardKey.arrowDown,
], tester: tester);
// Checks whether the options in the selection menu
// for /grid exist.
expect(find.byType(SelectionMenuItemWidget), findsAtLeastNWidgets(2));
// Finalizes the slash command that creates the board.
await simulateKeyDownEvent(LogicalKeyboardKey.enter);
await tester.pumpAndSettle();
// Checks whether new board is referenced and properly on the page.
expect(find.byType(BuiltInPageWidget), findsOneWidget);
// Checks whether the new database was created
const newTableLabel = "Untitled";
expect(find.text(newTableLabel), findsOneWidget);
// Checks whether a view of the database was created
const viewOfTableLabel = "View of Untitled";
expect(find.text(viewOfTableLabel), findsNWidgets(2));
});
});
}

View File

@ -0,0 +1,19 @@
import 'package:integration_test/integration_test.dart';
import 'board_test.dart' as board_test;
import 'switch_folder_test.dart' as switch_folder_test;
import 'empty_document_test.dart' as empty_document_test;
/// The main task runner for all integration tests in AppFlowy.
///
/// Having a single entrypoint for integration tests is necessary due to an
/// [issue caused by switching files with integration testing](https://github.com/flutter/flutter/issues/101031).
/// If flutter/flutter#101031 is resolved, this file can be removed completely.
/// Once removed, the integration_test.yaml must be updated to exclude this as
/// as the test target.
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
switch_folder_test.main();
board_test.main();
empty_document_test.main();
}

View File

@ -1,10 +1,5 @@
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/plugins/document/presentation/plugins/base/built_in_page_widget.dart';
import 'package:appflowy/user/presentation/folder/folder_widget.dart'; import 'package:appflowy/user/presentation/folder/folder_widget.dart';
import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra_ui/style_widget/text_field.dart'; import 'package:flowy_infra_ui/style_widget/text_field.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart'; import 'package:integration_test/integration_test.dart';
@ -162,135 +157,5 @@ void main() {
await TestFolder.currentLocation(), await TestFolder.currentLocation(),
); );
}); });
testWidgets('/board shortcut creates a new board', (tester) async {
const folderName = 'appflowy';
await TestFolder.cleanTestLocation(folderName);
await TestFolder.setTestLocation(folderName);
await tester.initializeAppFlowy();
// tap open button
await mockGetDirectoryPath(folderName);
await tester.tapOpenFolderButton();
await tester.wait(1000);
await tester.expectToSeeWelcomePage();
final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized();
// Necessary for being able to enterText when not in debug mode
binding.testTextInput.register();
// Needs tab to obtain focus for the app flowy editor.
// by default the tap appears at the center of the widget.
final Finder editor = find.byType(AppFlowyEditor);
await tester.tap(editor);
await tester.pumpAndSettle();
// tester.sendText() cannot be used since the editor
// does not contain any EditableText widgets.
// to interact with the app during an integration test,
// simulate physical keyboard events.
await simulateKeyDownEvent(LogicalKeyboardKey.enter);
await tester.pumpAndSettle();
await simulateKeyDownEvent(LogicalKeyboardKey.enter);
await tester.pumpAndSettle();
await simulateKeyDownEvent(LogicalKeyboardKey.arrowLeft);
await tester.pumpAndSettle();
await simulateKeyDownEvent(LogicalKeyboardKey.slash);
await tester.pumpAndSettle();
await simulateKeyDownEvent(LogicalKeyboardKey.keyB);
await tester.pumpAndSettle();
await simulateKeyDownEvent(LogicalKeyboardKey.keyO);
await tester.pumpAndSettle();
await simulateKeyDownEvent(LogicalKeyboardKey.keyA);
await tester.pumpAndSettle();
await simulateKeyDownEvent(LogicalKeyboardKey.keyR);
await tester.pumpAndSettle();
await simulateKeyDownEvent(LogicalKeyboardKey.keyD);
await tester.pumpAndSettle();
await simulateKeyDownEvent(LogicalKeyboardKey.arrowDown);
await tester.pumpAndSettle();
// Checks whether the options in the selection menu
// for /board exist.
expect(find.byType(SelectionMenuItemWidget), findsAtLeastNWidgets(2));
// Finalizes the slash command that creates the board.
await simulateKeyDownEvent(LogicalKeyboardKey.enter);
await tester.pumpAndSettle();
// Checks whether new board is referenced and properly on the page.
expect(find.byType(BuiltInPageWidget), findsOneWidget);
// Checks whether the new board is in the side bar.
final sidebarLabel = LocaleKeys.newPageText.tr();
expect(find.text(sidebarLabel), findsOneWidget);
});
testWidgets('/grid shortcut creates a new grid', (tester) async {
const folderName = 'appflowy';
await TestFolder.cleanTestLocation(folderName);
await TestFolder.setTestLocation(folderName);
await tester.initializeAppFlowy();
// tap open button
await mockGetDirectoryPath(folderName);
await tester.tapOpenFolderButton();
await tester.wait(1000);
await tester.expectToSeeWelcomePage();
final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized();
// Necessary for being able to enterText when not in debug mode
binding.testTextInput.register();
// Needs tab to obtain focus for the app flowy editor.
// by default the tap appears at the center of the widget.
final Finder editor = find.byType(AppFlowyEditor);
await tester.tap(editor);
await tester.pumpAndSettle();
// tester.sendText() cannot be used since the editor
// does not contain any EditableText widgets.
// to interact with the app during an integration test,
// simulate physical keyboard events.
await simulateKeyDownEvent(LogicalKeyboardKey.enter);
await tester.pumpAndSettle();
await simulateKeyDownEvent(LogicalKeyboardKey.enter);
await tester.pumpAndSettle();
await simulateKeyDownEvent(LogicalKeyboardKey.arrowLeft);
await tester.pumpAndSettle();
await simulateKeyDownEvent(LogicalKeyboardKey.slash);
await tester.pumpAndSettle();
await simulateKeyDownEvent(LogicalKeyboardKey.keyG);
await tester.pumpAndSettle();
await simulateKeyDownEvent(LogicalKeyboardKey.keyR);
await tester.pumpAndSettle();
await simulateKeyDownEvent(LogicalKeyboardKey.keyI);
await tester.pumpAndSettle();
await simulateKeyDownEvent(LogicalKeyboardKey.keyD);
await tester.pumpAndSettle();
await simulateKeyDownEvent(LogicalKeyboardKey.arrowDown);
await tester.pumpAndSettle();
// Checks whether the options in the selection menu
// for /grid exist.
expect(find.byType(SelectionMenuItemWidget), findsAtLeastNWidgets(2));
// Finalizes the slash command that creates the board.
await simulateKeyDownEvent(LogicalKeyboardKey.enter);
await tester.pumpAndSettle();
// Checks whether new board is referenced and properly on the page.
expect(find.byType(BuiltInPageWidget), findsOneWidget);
// Checks whether the new board is in the side bar.
final sidebarLabel = LocaleKeys.newPageText.tr();
expect(find.text(sidebarLabel), findsOneWidget);
});
}); });
} }

View File

@ -0,0 +1,66 @@
import 'dart:io';
import 'package:appflowy/workspace/application/settings/settings_location_cubit.dart';
import 'package:archive/archive_io.dart';
import 'package:flutter/services.dart';
import 'package:path/path.dart' as p;
import 'package:path_provider/path_provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
enum TestWorkspace {
board("board"),
emptyDocument("empty_document");
const TestWorkspace(this._name);
final String _name;
Future<File> get zip async {
final Directory parent = await TestWorkspace._parent;
final File out = File(p.join(parent.path, '$_name.zip'));
if (await out.exists()) return out;
await out.create();
final ByteData data = await rootBundle.load(_asset);
await out.writeAsBytes(data.buffer.asUint8List());
return out;
}
Future<Directory> get root async {
final Directory parent = await TestWorkspace._parent;
return Directory(p.join(parent.path, _name));
}
static Future<Directory> get _parent async {
final Directory root = await getTemporaryDirectory();
if (await root.exists()) return root;
await root.create();
return root;
}
String get _asset => 'assets/test/workspaces/$_name.zip';
}
class TestWorkspaceService {
const TestWorkspaceService(this.workspace);
final TestWorkspace workspace;
/// Instructs the application to read workspace data from the workspace found under this [TestWorkspace]'s path.
Future<void> setUpAll() async {
SharedPreferences.setMockInitialValues(
{
kSettingsLocationDefaultLocation:
await workspace.root.then((value) => value.path),
},
);
}
/// Workspaces that are checked into source are compressed. [TestWorkspaceService.setUp()] decompresses the file into an ephemeral directory that will be ignored by source control.
Future<void> setUp() async {
final inputStream =
InputFileStream(await workspace.zip.then((value) => value.path));
final archive = ZipDecoder().decodeBuffer(inputStream);
extractArchiveToDisk(
archive, await TestWorkspace._parent.then((value) => value.path));
}
}

View File

@ -0,0 +1,12 @@
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart' as flutter_test;
class FlowyTestKeyboard {
static Future<void> simulateKeyDownEvent(List<LogicalKeyboardKey> keys,
{required flutter_test.WidgetTester tester}) async {
for (final LogicalKeyboardKey key in keys) {
await flutter_test.simulateKeyDownEvent(key);
await tester.pumpAndSettle();
}
}
}

View File

@ -1,3 +1,4 @@
export 'base.dart'; export 'base.dart';
export 'launch.dart'; export 'launch.dart';
export 'settings.dart'; export 'settings.dart';
export 'data.dart';

View File

@ -3,7 +3,7 @@ import 'dart:typed_data';
import 'package:appflowy_backend/protobuf/flowy-notification/protobuf.dart'; import 'package:appflowy_backend/protobuf/flowy-notification/protobuf.dart';
import 'package:dartz/dartz.dart'; import 'package:dartz/dartz.dart';
import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/notification.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-folder2/notification.pb.dart';
import 'package:appflowy_backend/rust_stream.dart'; import 'package:appflowy_backend/rust_stream.dart';
import 'notification_helper.dart'; import 'notification_helper.dart';

View File

@ -9,7 +9,7 @@ import 'package:appflowy_backend/protobuf/flowy-database/group_changeset.pb.dart
import 'package:appflowy_backend/protobuf/flowy-database/row_entities.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/row_entities.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-database/setting_entities.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/setting_entities.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:collection/collection.dart'; import 'package:collection/collection.dart';
import 'dart:async'; import 'dart:async';
import 'package:dartz/dartz.dart'; import 'package:dartz/dartz.dart';
@ -79,7 +79,7 @@ class DatabaseController {
final DatabaseViewBackendService _databaseViewBackendSvc; final DatabaseViewBackendService _databaseViewBackendSvc;
final FieldController fieldController; final FieldController fieldController;
late DatabaseViewCache _viewCache; late DatabaseViewCache _viewCache;
final LayoutTypePB layoutType; final DatabaseLayoutPB layoutType;
// Callbacks // Callbacks
DatabaseCallbacks? _databaseCallbacks; DatabaseCallbacks? _databaseCallbacks;
@ -110,7 +110,7 @@ class DatabaseController {
_listenOnFieldsChanged(); _listenOnFieldsChanged();
_listenOnGroupChanged(); _listenOnGroupChanged();
_listenOnLayoutChanged(); _listenOnLayoutChanged();
if (layoutType == LayoutTypePB.Calendar) { if (layoutType == DatabaseLayoutPB.Calendar) {
_listenOnCalendarLayoutChanged(); _listenOnCalendarLayoutChanged();
} }
} }

View File

@ -5,7 +5,7 @@ import 'package:dartz/dartz.dart';
class DatabaseBackendService { class DatabaseBackendService {
static Future<Either<List<DatabaseDescriptionPB>, FlowyError>> static Future<Either<List<DatabaseDescriptionPB>, FlowyError>>
getAllDatabase() { getAllDatabases() {
return DatabaseEventGetDatabases().send().then((result) { return DatabaseEventGetDatabases().send().then((result) {
return result.fold((l) => left(l.items), (r) => right(r)); return result.fold((l) => left(l.items), (r) => right(r));
}); });

View File

@ -5,7 +5,7 @@ import 'package:appflowy_backend/protobuf/flowy-database/setting_entities.pb.dar
import 'package:dartz/dartz.dart'; import 'package:dartz/dartz.dart';
import 'package:appflowy_backend/dispatch/dispatch.dart'; import 'package:appflowy_backend/dispatch/dispatch.dart';
import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-database/field_entities.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/field_entities.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-database/group.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/group.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-database/row_entities.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/row_entities.pb.dart';
@ -86,7 +86,7 @@ class DatabaseViewBackendService {
} }
Future<Either<LayoutSettingPB, FlowyError>> getLayoutSetting( Future<Either<LayoutSettingPB, FlowyError>> getLayoutSetting(
LayoutTypePB layoutType) { DatabaseLayoutPB layoutType) {
final payload = DatabaseLayoutIdPB.create() final payload = DatabaseLayoutIdPB.create()
..viewId = viewId ..viewId = viewId
..layout = layoutType; ..layout = layoutType;

View File

@ -2,7 +2,6 @@ import 'package:appflowy_backend/log.dart';
import 'package:appflowy_backend/protobuf/flowy-database/field_entities.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/field_entities.pb.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:freezed_annotation/freezed_annotation.dart';
import 'dart:async';
import 'field_service.dart'; import 'field_service.dart';
part 'field_action_sheet_bloc.freezed.dart'; part 'field_action_sheet_bloc.freezed.dart';
@ -64,11 +63,6 @@ class FieldActionSheetBloc
}, },
); );
} }
@override
Future<void> close() async {
return super.close();
}
} }
@freezed @freezed

View File

@ -1,6 +1,5 @@
import 'package:appflowy_backend/protobuf/flowy-database/field_entities.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/field_entities.pb.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'dart:async';
import 'package:dartz/dartz.dart'; import 'package:dartz/dartz.dart';
import 'field_service.dart'; import 'field_service.dart';
import 'type_option/type_option_context.dart'; import 'type_option/type_option_context.dart';
@ -17,8 +16,7 @@ class FieldEditorBloc extends Bloc<FieldEditorEvent, FieldEditorState> {
required String fieldName, required String fieldName,
required bool isGroupField, required bool isGroupField,
required IFieldTypeOptionLoader loader, required IFieldTypeOptionLoader loader,
}) : dataController = }) : dataController = TypeOptionController(viewId: viewId, loader: loader),
TypeOptionController(viewId: viewId, loader: loader),
super(FieldEditorState.initial(viewId, fieldName, isGroupField)) { super(FieldEditorState.initial(viewId, fieldName, isGroupField)) {
on<FieldEditorEvent>( on<FieldEditorEvent>(
(event, emit) async { (event, emit) async {
@ -63,11 +61,6 @@ class FieldEditorBloc extends Bloc<FieldEditorEvent, FieldEditorState> {
}, },
); );
} }
@override
Future<void> close() async {
return super.close();
}
} }
@freezed @freezed

View File

@ -2,7 +2,6 @@ import 'package:appflowy_backend/protobuf/flowy-database/date_type_option.pb.dar
import 'package:appflowy_backend/protobuf/flowy-database/date_type_option_entities.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/date_type_option_entities.pb.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:freezed_annotation/freezed_annotation.dart';
import 'dart:async';
import 'package:protobuf/protobuf.dart'; import 'package:protobuf/protobuf.dart';
import 'type_option_context.dart'; import 'type_option_context.dart';
@ -52,11 +51,6 @@ class DateTypeOptionBloc
} }
}); });
} }
@override
Future<void> close() async {
return super.close();
}
} }
@freezed @freezed

View File

@ -1,7 +1,6 @@
import 'package:appflowy_backend/protobuf/flowy-database/select_type_option.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/select_type_option.pb.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:freezed_annotation/freezed_annotation.dart';
import 'dart:async';
import 'package:protobuf/protobuf.dart'; import 'package:protobuf/protobuf.dart';
import 'package:dartz/dartz.dart'; import 'package:dartz/dartz.dart';
part 'edit_select_option_bloc.freezed.dart'; part 'edit_select_option_bloc.freezed.dart';
@ -27,11 +26,6 @@ class EditSelectOptionBloc
); );
} }
@override
Future<void> close() async {
return super.close();
}
SelectOptionPB _updateColor(SelectOptionColorPB color) { SelectOptionPB _updateColor(SelectOptionColorPB color) {
state.option.freeze(); state.option.freeze();
return state.option.rebuild((option) { return state.option.rebuild((option) {

View File

@ -2,7 +2,6 @@ import 'package:appflowy_backend/protobuf/flowy-database/format.pbenum.dart';
import 'package:appflowy_backend/protobuf/flowy-database/number_type_option.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/number_type_option.pb.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:freezed_annotation/freezed_annotation.dart';
import 'dart:async';
import 'package:protobuf/protobuf.dart'; import 'package:protobuf/protobuf.dart';
import 'type_option_context.dart'; import 'type_option_context.dart';
@ -29,11 +28,6 @@ class NumberTypeOptionBloc
typeOption.format = format; typeOption.format = format;
}); });
} }
@override
Future<void> close() async {
return super.close();
}
} }
@freezed @freezed

View File

@ -1,7 +1,6 @@
import 'package:appflowy_backend/protobuf/flowy-database/format.pbenum.dart'; import 'package:appflowy_backend/protobuf/flowy-database/format.pbenum.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:freezed_annotation/freezed_annotation.dart';
import 'dart:async';
part 'number_format_bloc.freezed.dart'; part 'number_format_bloc.freezed.dart';
class NumberFormatBloc extends Bloc<NumberFormatEvent, NumberFormatState> { class NumberFormatBloc extends Bloc<NumberFormatEvent, NumberFormatState> {
@ -21,11 +20,6 @@ class NumberFormatBloc extends Bloc<NumberFormatEvent, NumberFormatState> {
}, },
); );
} }
@override
Future<void> close() async {
return super.close();
}
} }
@freezed @freezed

View File

@ -49,11 +49,6 @@ class SelectOptionTypeOptionBloc
}, },
); );
} }
@override
Future<void> close() async {
return super.close();
}
} }
@freezed @freezed

View File

@ -1,6 +1,5 @@
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:freezed_annotation/freezed_annotation.dart';
import 'dart:async';
import 'package:dartz/dartz.dart'; import 'package:dartz/dartz.dart';
part 'setting_bloc.freezed.dart'; part 'setting_bloc.freezed.dart';
@ -18,11 +17,6 @@ class DatabaseSettingBloc
}, },
); );
} }
@override
Future<void> close() async {
return super.close();
}
} }
@freezed @freezed

View File

@ -6,7 +6,7 @@ import 'package:dartz/dartz.dart';
import 'package:equatable/equatable.dart'; import 'package:equatable/equatable.dart';
import 'package:appflowy_backend/log.dart'; import 'package:appflowy_backend/log.dart';
import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-database/protobuf.dart'; import 'package:appflowy_backend/protobuf/flowy-database/protobuf.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:freezed_annotation/freezed_annotation.dart';
@ -30,7 +30,7 @@ class BoardBloc extends Bloc<BoardEvent, BoardState> {
BoardBloc({required ViewPB view}) BoardBloc({required ViewPB view})
: _databaseController = DatabaseController( : _databaseController = DatabaseController(
view: view, view: view,
layoutType: LayoutTypePB.Board, layoutType: DatabaseLayoutPB.Board,
), ),
super(BoardState.initial(view.id)) { super(BoardState.initial(view.id)) {
boardController = AppFlowyBoardController( boardController = AppFlowyBoardController(

View File

@ -1,6 +1,5 @@
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:freezed_annotation/freezed_annotation.dart';
import 'dart:async';
import 'package:dartz/dartz.dart'; import 'package:dartz/dartz.dart';
part 'board_setting_bloc.freezed.dart'; part 'board_setting_bloc.freezed.dart';
@ -17,11 +16,6 @@ class BoardSettingBloc extends Bloc<BoardSettingEvent, BoardSettingState> {
}, },
); );
} }
@override
Future<void> close() async {
return super.close();
}
} }
@freezed @freezed

View File

@ -3,7 +3,7 @@ import 'package:appflowy/plugins/util.dart';
import 'package:appflowy/startup/plugin/plugin.dart'; import 'package:appflowy/startup/plugin/plugin.dart';
import 'package:appflowy/workspace/presentation/home/home_stack.dart'; import 'package:appflowy/workspace/presentation/home/home_stack.dart';
import 'package:appflowy/workspace/presentation/widgets/left_bar_item.dart'; import 'package:appflowy/workspace/presentation/widgets/left_bar_item.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -29,7 +29,7 @@ class BoardPluginBuilder implements PluginBuilder {
PluginType get pluginType => PluginType.board; PluginType get pluginType => PluginType.board;
@override @override
ViewLayoutTypePB? get layoutType => ViewLayoutTypePB.Board; ViewLayoutPB? get layoutType => ViewLayoutPB.Board;
} }
class BoardPluginConfig implements PluginConfig { class BoardPluginConfig implements PluginConfig {

View File

@ -7,7 +7,7 @@ import 'package:appflowy/plugins/database_view/application/field/field_controlle
import 'package:appflowy/plugins/database_view/application/row/row_cache.dart'; import 'package:appflowy/plugins/database_view/application/row/row_cache.dart';
import 'package:appflowy/plugins/database_view/application/row/row_data_controller.dart'; import 'package:appflowy/plugins/database_view/application/row/row_data_controller.dart';
import 'package:appflowy/plugins/database_view/widgets/row/row_detail.dart'; import 'package:appflowy/plugins/database_view/widgets/row/row_detail.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-database/field_entities.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/field_entities.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-database/row_entities.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/row_entities.pb.dart';
import 'package:appflowy_board/appflowy_board.dart'; import 'package:appflowy_board/appflowy_board.dart';
@ -184,7 +184,7 @@ class _BoardContentState extends State<BoardContent> {
width: 20, width: 20,
child: svgWidget( child: svgWidget(
"home/add", "home/add",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
), ),
onAddButtonClick: () { onAddButtonClick: () {
@ -207,7 +207,7 @@ class _BoardContentState extends State<BoardContent> {
width: 20, width: 20,
child: svgWidget( child: svgWidget(
"home/add", "home/add",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
), ),
title: FlowyText.medium( title: FlowyText.medium(

View File

@ -113,7 +113,7 @@ class _SettingItem extends StatelessWidget {
}, },
leftIcon: svgWidget( leftIcon: svgWidget(
action.iconName(), action.iconName(),
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
), ),
); );

View File

@ -3,7 +3,7 @@ import 'package:appflowy/plugins/database_view/application/field/field_controlle
import 'package:appflowy_backend/dispatch/dispatch.dart'; import 'package:appflowy_backend/dispatch/dispatch.dart';
import 'package:appflowy_backend/log.dart'; import 'package:appflowy_backend/log.dart';
import 'package:appflowy_backend/protobuf/flowy-error/protobuf.dart'; import 'package:appflowy_backend/protobuf/flowy-error/protobuf.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/protobuf.dart'; import 'package:appflowy_backend/protobuf/flowy-folder2/protobuf.dart';
import 'package:appflowy_backend/protobuf/flowy-database/protobuf.dart'; import 'package:appflowy_backend/protobuf/flowy-database/protobuf.dart';
import 'package:calendar_view/calendar_view.dart'; import 'package:calendar_view/calendar_view.dart';
import 'package:dartz/dartz.dart'; import 'package:dartz/dartz.dart';
@ -28,7 +28,7 @@ class CalendarBloc extends Bloc<CalendarEvent, CalendarState> {
CalendarBloc({required ViewPB view}) CalendarBloc({required ViewPB view})
: _databaseController = DatabaseController( : _databaseController = DatabaseController(
view: view, view: view,
layoutType: LayoutTypePB.Calendar, layoutType: DatabaseLayoutPB.Calendar,
), ),
super(CalendarState.initial()) { super(CalendarState.initial()) {
on<CalendarEvent>( on<CalendarEvent>(

View File

@ -23,8 +23,6 @@ class CalendarSettingBloc
}); });
} }
@override
Future<void> close() async => super.close();
} }
@freezed @freezed

View File

@ -3,7 +3,7 @@ import 'package:appflowy/startup/plugin/plugin.dart';
import 'package:appflowy/workspace/presentation/home/home_stack.dart'; import 'package:appflowy/workspace/presentation/home/home_stack.dart';
import 'package:appflowy/workspace/presentation/widgets/left_bar_item.dart'; import 'package:appflowy/workspace/presentation/widgets/left_bar_item.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../util.dart'; import '../../util.dart';
@ -29,7 +29,7 @@ class CalendarPluginBuilder extends PluginBuilder {
PluginType get pluginType => PluginType.calendar; PluginType get pluginType => PluginType.calendar;
@override @override
ViewLayoutTypePB? get layoutType => ViewLayoutTypePB.Calendar; ViewLayoutPB? get layoutType => ViewLayoutPB.Calendar;
} }
class CalendarPluginConfig implements PluginConfig { class CalendarPluginConfig implements PluginConfig {

View File

@ -203,7 +203,7 @@ class _NewEventButton extends StatelessWidget {
iconPadding: EdgeInsets.zero, iconPadding: EdgeInsets.zero,
icon: svgWidget( icon: svgWidget(
"home/add", "home/add",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
width: 22, width: 22,
); );

View File

@ -1,6 +1,6 @@
import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/plugins/database_view/calendar/application/calendar_bloc.dart'; import 'package:appflowy/plugins/database_view/calendar/application/calendar_bloc.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:calendar_view/calendar_view.dart'; import 'package:calendar_view/calendar_view.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';

View File

@ -1,5 +1,3 @@
import 'dart:async';
import 'package:appflowy/plugins/database_view/grid/presentation/widgets/filter/choicechip/select_option/select_option_loader.dart'; import 'package:appflowy/plugins/database_view/grid/presentation/widgets/filter/choicechip/select_option/select_option_loader.dart';
import 'package:appflowy_backend/protobuf/flowy-database/field_entities.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/field_entities.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-database/select_type_option.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/select_type_option.pb.dart';
@ -63,11 +61,6 @@ class SelectOptionFilterListBloc<T>
); );
} }
@override
Future<void> close() async {
return super.close();
}
void _updateSelectOptions({ void _updateSelectOptions({
String? predicate, String? predicate,
Set<String>? selectedOptionIds, Set<String>? selectedOptionIds,

View File

@ -4,7 +4,7 @@ import 'package:appflowy/plugins/database_view/application/row/row_service.dart'
import 'package:dartz/dartz.dart'; import 'package:dartz/dartz.dart';
import 'package:equatable/equatable.dart'; import 'package:equatable/equatable.dart';
import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-database/protobuf.dart'; import 'package:appflowy_backend/protobuf/flowy-database/protobuf.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:freezed_annotation/freezed_annotation.dart';

View File

@ -61,11 +61,6 @@ class GridHeaderBloc extends Bloc<GridHeaderEvent, GridHeaderState> {
listenWhen: () => !isClosed, listenWhen: () => !isClosed,
); );
} }
@override
Future<void> close() async {
return super.close();
}
} }
@freezed @freezed

View File

@ -2,7 +2,6 @@ import 'package:appflowy_backend/log.dart';
import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:freezed_annotation/freezed_annotation.dart';
import 'dart:async';
import 'package:dartz/dartz.dart'; import 'package:dartz/dartz.dart';
import '../../../application/row/row_cache.dart'; import '../../../application/row/row_cache.dart';
@ -34,11 +33,6 @@ class RowActionSheetBloc
); );
} }
@override
Future<void> close() async {
return super.close();
}
void logResult(Either<Unit, FlowyError> result) { void logResult(Either<Unit, FlowyError> result) {
result.fold((l) => null, (err) => Log.error(err)); result.fold((l) => null, (err) => Log.error(err));
} }

View File

@ -4,7 +4,7 @@ import 'package:appflowy/startup/plugin/plugin.dart';
import 'package:appflowy/workspace/presentation/home/home_stack.dart'; import 'package:appflowy/workspace/presentation/home/home_stack.dart';
import 'package:appflowy/workspace/presentation/widgets/left_bar_item.dart'; import 'package:appflowy/workspace/presentation/widgets/left_bar_item.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'presentation/grid_page.dart'; import 'presentation/grid_page.dart';
@ -29,7 +29,7 @@ class GridPluginBuilder implements PluginBuilder {
PluginType get pluginType => PluginType.grid; PluginType get pluginType => PluginType.grid;
@override @override
ViewLayoutTypePB? get layoutType => ViewLayoutTypePB.Grid; ViewLayoutPB? get layoutType => ViewLayoutPB.Grid;
} }
class GridPluginConfig implements PluginConfig { class GridPluginConfig implements PluginConfig {

View File

@ -8,7 +8,7 @@ import 'package:flowy_infra_ui/style_widget/scrolling/styled_scroll_bar.dart';
import 'package:flowy_infra_ui/style_widget/scrolling/styled_scrollview.dart'; import 'package:flowy_infra_ui/style_widget/scrolling/styled_scrollview.dart';
import 'package:flowy_infra_ui/style_widget/text.dart'; import 'package:flowy_infra_ui/style_widget/text.dart';
import 'package:flowy_infra_ui/widget/error_page.dart'; import 'package:flowy_infra_ui/widget/error_page.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:linked_scroll_controller/linked_scroll_controller.dart'; import 'package:linked_scroll_controller/linked_scroll_controller.dart';
@ -38,7 +38,7 @@ class GridPage extends StatefulWidget {
Key? key, Key? key,
}) : databaseController = DatabaseController( }) : databaseController = DatabaseController(
view: view, view: view,
layoutType: LayoutTypePB.Grid, layoutType: DatabaseLayoutPB.Grid,
), ),
super(key: key); super(key: key);

View File

@ -38,12 +38,15 @@ class ChoiceChipButton extends StatelessWidget {
child: FlowyButton( child: FlowyButton(
decoration: decoration, decoration: decoration,
useIntrinsicWidth: true, useIntrinsicWidth: true,
text: FlowyText(filterInfo.fieldInfo.name), text: FlowyText(
filterInfo.fieldInfo.name,
color: AFThemeExtension.of(context).textColor,
),
margin: const EdgeInsets.symmetric(horizontal: 8, vertical: 2), margin: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
radius: const BorderRadius.all(Radius.circular(14)), radius: const BorderRadius.all(Radius.circular(14)),
leftIcon: svgWidget( leftIcon: svgWidget(
filterInfo.fieldInfo.fieldType.iconName(), filterInfo.fieldInfo.fieldType.iconName(),
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
rightIcon: _ChoicechipFilterDesc(filterDesc: filterDesc), rightIcon: _ChoicechipFilterDesc(filterDesc: filterDesc),
hoverColor: AFThemeExtension.of(context).lightGreyHover, hoverColor: AFThemeExtension.of(context).lightGreyHover,
@ -62,7 +65,8 @@ class _ChoicechipFilterDesc extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final arrow = Transform.rotate( final arrow = Transform.rotate(
angle: -math.pi / 2, angle: -math.pi / 2,
child: svgWidget("home/arrow_left"), child: svgWidget("home/arrow_left",
color: AFThemeExtension.of(context).textColor),
); );
return Padding( return Padding(
padding: const EdgeInsets.symmetric(horizontal: 2), padding: const EdgeInsets.symmetric(horizontal: 2),

View File

@ -18,14 +18,19 @@ class ConditionButton extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final arrow = Transform.rotate( final arrow = Transform.rotate(
angle: -math.pi / 2, angle: -math.pi / 2,
child: svgWidget("home/arrow_left"), child: svgWidget("home/arrow_left",
color: AFThemeExtension.of(context).textColor),
); );
return SizedBox( return SizedBox(
height: 20, height: 20,
child: FlowyButton( child: FlowyButton(
useIntrinsicWidth: true, useIntrinsicWidth: true,
text: FlowyText(conditionName, fontSize: 10), text: FlowyText(
conditionName,
fontSize: 10,
color: AFThemeExtension.of(context).textColor,
),
margin: const EdgeInsets.symmetric(horizontal: 4), margin: const EdgeInsets.symmetric(horizontal: 4),
radius: const BorderRadius.all(Radius.circular(2)), radius: const BorderRadius.all(Radius.circular(2)),
rightIcon: arrow, rightIcon: arrow,

View File

@ -3,6 +3,7 @@ import 'package:appflowy/plugins/database_view/grid/presentation/layout/sizes.da
import 'package:appflowy/plugins/database_view/grid/presentation/widgets/header/field_type_extension.dart'; import 'package:appflowy/plugins/database_view/grid/presentation/widgets/header/field_type_extension.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/style_widget/button.dart'; import 'package:flowy_infra_ui/style_widget/button.dart';
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart'; import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
import 'package:flowy_infra_ui/style_widget/text.dart'; import 'package:flowy_infra_ui/style_widget/text.dart';
@ -117,19 +118,16 @@ class _FilterTextFieldDelegate extends SliverPersistentHeaderDelegate {
@override @override
Widget build( Widget build(
BuildContext context, double shrinkOffset, bool overlapsContent) { BuildContext context, double shrinkOffset, bool overlapsContent) {
return Padding( return Container(
padding: const EdgeInsets.only(top: 4), padding: const EdgeInsets.only(top: 4),
child: Container( height: fixHeight,
color: Theme.of(context).colorScheme.background, child: FlowyTextField(
height: fixHeight, hintText: LocaleKeys.grid_settings_filterBy.tr(),
child: FlowyTextField( onChanged: (text) {
hintText: LocaleKeys.grid_settings_filterBy.tr(), context
onChanged: (text) { .read<GridCreateFilterBloc>()
context .add(GridCreateFilterEvent.didReceiveFilterText(text));
.read<GridCreateFilterBloc>() },
.add(GridCreateFilterEvent.didReceiveFilterText(text));
},
),
), ),
); );
} }
@ -158,11 +156,15 @@ class _FilterPropertyCell extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return FlowyButton( return FlowyButton(
text: FlowyText.medium(fieldInfo.name), hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium(
fieldInfo.name,
color: AFThemeExtension.of(context).textColor,
),
onTap: () => onTap(fieldInfo), onTap: () => onTap(fieldInfo),
leftIcon: svgWidget( leftIcon: svgWidget(
fieldInfo.fieldType.iconName(), fieldInfo.fieldType.iconName(),
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
); );
} }

View File

@ -3,6 +3,7 @@ import 'package:appflowy/workspace/presentation/widgets/pop_up_action.dart';
import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/style_widget/icon_button.dart'; import 'package:flowy_infra_ui/style_widget/icon_button.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -31,10 +32,11 @@ class _DisclosureButtonState extends State<DisclosureButton> {
.toList(), .toList(),
buildChild: (controller) { buildChild: (controller) {
return FlowyIconButton( return FlowyIconButton(
hoverColor: AFThemeExtension.of(context).lightGreyHover,
width: 20, width: 20,
icon: svgWidget( icon: svgWidget(
"editor/details", "editor/details",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
onPressed: () => controller.show(), onPressed: () => controller.show(),
); );

View File

@ -71,12 +71,15 @@ class _AddFilterButtonState extends State<AddFilterButton> {
SizedBox( SizedBox(
height: 28, height: 28,
child: FlowyButton( child: FlowyButton(
text: FlowyText(LocaleKeys.grid_settings_addFilter.tr()), text: FlowyText(
LocaleKeys.grid_settings_addFilter.tr(),
color: AFThemeExtension.of(context).textColor,
),
useIntrinsicWidth: true, useIntrinsicWidth: true,
hoverColor: AFThemeExtension.of(context).lightGreyHover, hoverColor: AFThemeExtension.of(context).lightGreyHover,
leftIcon: svgWidget( leftIcon: svgWidget(
"home/add", "home/add",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
onTap: () => popoverController.show(), onTap: () => popoverController.show(),
), ),

View File

@ -14,12 +14,15 @@ class GridAddRowButton extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return FlowyButton( return FlowyButton(
text: FlowyText.medium(LocaleKeys.grid_row_newRow.tr()), text: FlowyText.medium(
LocaleKeys.grid_row_newRow.tr(),
color: Theme.of(context).colorScheme.tertiary,
),
hoverColor: AFThemeExtension.of(context).lightGreyHover, hoverColor: AFThemeExtension.of(context).lightGreyHover,
onTap: () => context.read<GridBloc>().add(const GridEvent.createRow()), onTap: () => context.read<GridBloc>().add(const GridEvent.createRow()),
leftIcon: svgWidget( leftIcon: svgWidget(
"home/add", "home/add",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).colorScheme.tertiary,
), ),
); );
} }

View File

@ -164,11 +164,10 @@ class FieldCellButton extends StatelessWidget {
.replaceAll(Characters(''), Characters('\u{200B}')) .replaceAll(Characters(''), Characters('\u{200B}'))
.toString(); .toString();
return FlowyButton( return FlowyButton(
hoverColor: AFThemeExtension.of(context).lightGreyHover, hoverColor: AFThemeExtension.of(context).greyHover,
onTap: onTap, onTap: onTap,
leftIcon: svgWidget( leftIcon: FlowySvg(
field.fieldType.iconName(), name: field.fieldType.iconName(),
color: Theme.of(context).colorScheme.onSurface,
), ),
radius: BorderRadius.zero, radius: BorderRadius.zero,
text: FlowyText.medium( text: FlowyText.medium(

View File

@ -5,6 +5,7 @@ import 'package:appflowy/startup/startup.dart';
import 'package:appflowy/workspace/presentation/widgets/dialogs.dart'; import 'package:appflowy/workspace/presentation/widgets/dialogs.dart';
import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/style_widget/button.dart'; import 'package:flowy_infra_ui/style_widget/button.dart';
import 'package:flowy_infra_ui/style_widget/text.dart'; import 'package:flowy_infra_ui/style_widget/text.dart';
import 'package:flowy_infra_ui/widget/spacing.dart'; import 'package:flowy_infra_ui/widget/spacing.dart';
@ -81,8 +82,10 @@ class _EditFieldButton extends StatelessWidget {
return SizedBox( return SizedBox(
height: GridSize.popoverItemHeight, height: GridSize.popoverItemHeight,
child: FlowyButton( child: FlowyButton(
hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium( text: FlowyText.medium(
LocaleKeys.grid_field_editProperty.tr(), LocaleKeys.grid_field_editProperty.tr(),
color: AFThemeExtension.of(context).textColor,
), ),
onTap: onTap, onTap: onTap,
), ),
@ -148,9 +151,12 @@ class FieldActionCell extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return FlowyButton( return FlowyButton(
hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium( text: FlowyText.medium(
action.title(), action.title(),
color: enable ? null : Theme.of(context).disabledColor, color: enable
? AFThemeExtension.of(context).textColor
: Theme.of(context).disabledColor,
), ),
onTap: () { onTap: () {
if (enable) { if (enable) {
@ -160,7 +166,7 @@ class FieldActionCell extends StatelessWidget {
leftIcon: svgWidget( leftIcon: svgWidget(
action.iconName(), action.iconName(),
color: enable color: enable
? Theme.of(context).colorScheme.onSurface ? AFThemeExtension.of(context).textColor
: Theme.of(context).disabledColor, : Theme.of(context).disabledColor,
), ),
); );

View File

@ -147,6 +147,8 @@ class _FieldNameTextFieldState extends State<_FieldNameTextField> {
widget.popoverMutex.listenOnPopoverChanged(() { widget.popoverMutex.listenOnPopoverChanged(() {
if (focusNode.hasFocus) { if (focusNode.hasFocus) {
focusNode.unfocus(); focusNode.unfocus();
} else {
focusNode.requestFocus();
} }
}); });

View File

@ -1,5 +1,6 @@
import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:appflowy_backend/protobuf/flowy-database/field_entities.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/field_entities.pb.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -57,11 +58,15 @@ class FieldTypeCell extends StatelessWidget {
return SizedBox( return SizedBox(
height: GridSize.popoverItemHeight, height: GridSize.popoverItemHeight,
child: FlowyButton( child: FlowyButton(
text: FlowyText.medium(fieldType.title()), hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium(
fieldType.title(),
color: AFThemeExtension.of(context).textColor,
),
onTap: () => onSelectField(fieldType), onTap: () => onSelectField(fieldType),
leftIcon: svgWidget( leftIcon: svgWidget(
fieldType.iconName(), fieldType.iconName(),
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
), ),
); );

View File

@ -4,6 +4,7 @@ import 'package:appflowy/plugins/database_view/application/field/type_option/typ
import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:dartz/dartz.dart' show Either; import 'package:dartz/dartz.dart' show Either;
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-database/field_entities.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/field_entities.pb.dart';
@ -110,17 +111,19 @@ class _SwitchFieldButton extends StatelessWidget {
Widget _buildMoreButton(BuildContext context) { Widget _buildMoreButton(BuildContext context) {
final bloc = context.read<FieldTypeOptionEditBloc>(); final bloc = context.read<FieldTypeOptionEditBloc>();
return FlowyButton( return FlowyButton(
hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium( text: FlowyText.medium(
bloc.state.field.fieldType.title(), bloc.state.field.fieldType.title(),
color: AFThemeExtension.of(context).textColor,
), ),
margin: GridSize.typeOptionContentInsets, margin: GridSize.typeOptionContentInsets,
leftIcon: svgWidget( leftIcon: svgWidget(
bloc.state.field.fieldType.iconName(), bloc.state.field.fieldType.iconName(),
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
rightIcon: svgWidget( rightIcon: svgWidget(
"grid/more", "grid/more",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
); );
} }

View File

@ -178,12 +178,9 @@ class CreateFieldButton extends StatelessWidget {
child: FlowyButton( child: FlowyButton(
radius: BorderRadius.zero, radius: BorderRadius.zero,
text: FlowyText.medium(LocaleKeys.grid_field_newColumn.tr()), text: FlowyText.medium(LocaleKeys.grid_field_newColumn.tr()),
hoverColor: AFThemeExtension.of(context).lightGreyHover, hoverColor: AFThemeExtension.of(context).greyHover,
onTap: () {}, onTap: () {},
leftIcon: svgWidget( leftIcon: const FlowySvg(name: 'home/add'),
"home/add",
color: Theme.of(context).colorScheme.onSurface,
),
), ),
popupBuilder: (BuildContext popover) { popupBuilder: (BuildContext popover) {
return FieldEditor( return FieldEditor(

View File

@ -151,10 +151,7 @@ class DateFormatButton extends StatelessWidget {
margin: buttonMargins, margin: buttonMargins,
onTap: onTap, onTap: onTap,
onHover: onHover, onHover: onHover,
rightIcon: svgWidget( rightIcon: const FlowySvg(name: 'grid/more'),
"grid/more",
color: Theme.of(context).colorScheme.onSurface,
),
), ),
); );
} }
@ -182,10 +179,7 @@ class TimeFormatButton extends StatelessWidget {
margin: buttonMargins, margin: buttonMargins,
onTap: onTap, onTap: onTap,
onHover: onHover, onHover: onHover,
rightIcon: svgWidget( rightIcon: const FlowySvg(name: 'grid/more'),
"grid/more",
color: Theme.of(context).colorScheme.onSurface,
),
), ),
); );
} }

View File

@ -61,7 +61,7 @@ class NumberTypeOptionWidget extends TypeOptionWidget {
margin: GridSize.typeOptionContentInsets, margin: GridSize.typeOptionContentInsets,
rightIcon: svgWidget( rightIcon: svgWidget(
"grid/more", "grid/more",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
text: Row( text: Row(
children: [ children: [

View File

@ -1,6 +1,7 @@
import 'package:appflowy/plugins/database_view/application/field/type_option/select_option_type_option_bloc.dart'; import 'package:appflowy/plugins/database_view/application/field/type_option/select_option_type_option_bloc.dart';
import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:appflowy_backend/protobuf/flowy-database/select_type_option.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database/select_type_option.pb.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -194,7 +195,7 @@ class _OptionCellState extends State<_OptionCell> {
padding: const EdgeInsets.symmetric(horizontal: 6.0), padding: const EdgeInsets.symmetric(horizontal: 6.0),
child: svgWidget( child: svgWidget(
"grid/details", "grid/details",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
), ),
], ],
@ -243,7 +244,11 @@ class _AddOptionButton extends StatelessWidget {
child: SizedBox( child: SizedBox(
height: GridSize.popoverItemHeight, height: GridSize.popoverItemHeight,
child: FlowyButton( child: FlowyButton(
text: FlowyText.medium(LocaleKeys.grid_field_addSelectOption.tr()), hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium(
LocaleKeys.grid_field_addSelectOption.tr(),
color: AFThemeExtension.of(context).textColor,
),
onTap: () { onTap: () {
context context
.read<SelectOptionTypeOptionBloc>() .read<SelectOptionTypeOptionBloc>()
@ -251,7 +256,7 @@ class _AddOptionButton extends StatelessWidget {
}, },
leftIcon: svgWidget( leftIcon: svgWidget(
"home/add", "home/add",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
), ),
), ),

View File

@ -1,6 +1,7 @@
import 'package:appflowy/plugins/database_view/application/field/type_option/edit_select_option_bloc.dart'; import 'package:appflowy/plugins/database_view/application/field/type_option/edit_select_option_bloc.dart';
import 'package:appflowy/plugins/database_view/widgets/row/cells/select_option_cell/extension.dart'; import 'package:appflowy/plugins/database_view/widgets/row/cells/select_option_cell/extension.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/style_widget/button.dart'; import 'package:flowy_infra_ui/style_widget/button.dart';
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart'; import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
import 'package:flowy_infra_ui/style_widget/text.dart'; import 'package:flowy_infra_ui/style_widget/text.dart';
@ -103,10 +104,14 @@ class _DeleteTag extends StatelessWidget {
return SizedBox( return SizedBox(
height: GridSize.popoverItemHeight, height: GridSize.popoverItemHeight,
child: FlowyButton( child: FlowyButton(
text: FlowyText.medium(LocaleKeys.grid_selectOption_deleteTag.tr()), hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium(
LocaleKeys.grid_selectOption_deleteTag.tr(),
color: AFThemeExtension.of(context).textColor,
),
leftIcon: svgWidget( leftIcon: svgWidget(
"grid/delete", "grid/delete",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
onTap: () { onTap: () {
context context

View File

@ -3,6 +3,7 @@ import 'package:appflowy/plugins/database_view/grid/application/row/row_action_s
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/style_widget/button.dart'; import 'package:flowy_infra_ui/style_widget/button.dart';
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart'; import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
import 'package:flowy_infra_ui/style_widget/text.dart'; import 'package:flowy_infra_ui/style_widget/text.dart';
@ -56,9 +57,12 @@ class _ActionCell extends StatelessWidget {
return SizedBox( return SizedBox(
height: GridSize.popoverItemHeight, height: GridSize.popoverItemHeight,
child: FlowyButton( child: FlowyButton(
hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium( text: FlowyText.medium(
action.title(), action.title(),
color: action.enable() ? null : Theme.of(context).disabledColor, color: action.enable()
? AFThemeExtension.of(context).textColor
: Theme.of(context).disabledColor,
), ),
onTap: () { onTap: () {
if (action.enable()) { if (action.enable()) {
@ -67,7 +71,7 @@ class _ActionCell extends StatelessWidget {
}, },
leftIcon: svgWidget( leftIcon: svgWidget(
action.iconName(), action.iconName(),
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
), ),
); );

View File

@ -5,6 +5,7 @@ import 'package:appflowy/plugins/database_view/grid/application/row/row_bloc.dar
import 'package:appflowy/plugins/database_view/widgets/row/cell_builder.dart'; import 'package:appflowy/plugins/database_view/widgets/row/cell_builder.dart';
import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -152,11 +153,15 @@ class _InsertButton extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return FlowyIconButton( return FlowyIconButton(
tooltipText: LocaleKeys.tooltip_addNewRow.tr(), tooltipText: LocaleKeys.tooltip_addNewRow.tr(),
hoverColor: AFThemeExtension.of(context).lightGreyHover,
width: 20, width: 20,
height: 30, height: 30,
onPressed: () => context.read<RowBloc>().add(const RowEvent.createRow()), onPressed: () => context.read<RowBloc>().add(const RowEvent.createRow()),
iconPadding: const EdgeInsets.all(3), iconPadding: const EdgeInsets.all(3),
icon: svgWidget("home/add"), icon: svgWidget(
'home/add',
color: Theme.of(context).colorScheme.tertiary,
),
); );
} }
} }
@ -182,11 +187,15 @@ class _MenuButtonState extends State<_MenuButton> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return FlowyIconButton( return FlowyIconButton(
tooltipText: LocaleKeys.tooltip_openMenu.tr(), tooltipText: LocaleKeys.tooltip_openMenu.tr(),
hoverColor: AFThemeExtension.of(context).lightGreyHover,
width: 20, width: 20,
height: 30, height: 30,
onPressed: () => widget.openMenu(), onPressed: () => widget.openMenu(),
iconPadding: const EdgeInsets.all(3), iconPadding: const EdgeInsets.all(3),
icon: svgWidget("editor/details"), icon: svgWidget(
'editor/details',
color: Theme.of(context).colorScheme.tertiary,
),
); );
} }
} }

View File

@ -5,6 +5,7 @@ import 'package:appflowy/plugins/database_view/grid/presentation/layout/sizes.da
import 'package:appflowy/plugins/database_view/grid/presentation/widgets/header/field_type_extension.dart'; import 'package:appflowy/plugins/database_view/grid/presentation/widgets/header/field_type_extension.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/style_widget/button.dart'; import 'package:flowy_infra_ui/style_widget/button.dart';
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart'; import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
import 'package:flowy_infra_ui/style_widget/text.dart'; import 'package:flowy_infra_ui/style_widget/text.dart';
@ -116,19 +117,16 @@ class _FilterTextFieldDelegate extends SliverPersistentHeaderDelegate {
@override @override
Widget build( Widget build(
BuildContext context, double shrinkOffset, bool overlapsContent) { BuildContext context, double shrinkOffset, bool overlapsContent) {
return Padding( return Container(
padding: const EdgeInsets.only(top: 4), padding: const EdgeInsets.only(top: 4),
child: Container( height: fixHeight,
color: Theme.of(context).colorScheme.background, child: FlowyTextField(
height: fixHeight, hintText: LocaleKeys.grid_settings_sortBy.tr(),
child: FlowyTextField( onChanged: (text) {
hintText: LocaleKeys.grid_settings_sortBy.tr(), context
onChanged: (text) { .read<CreateSortBloc>()
context .add(CreateSortEvent.didReceiveFilterText(text));
.read<CreateSortBloc>() },
.add(CreateSortEvent.didReceiveFilterText(text));
},
),
), ),
); );
} }
@ -157,11 +155,15 @@ class _SortPropertyCell extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return FlowyButton( return FlowyButton(
text: FlowyText.medium(fieldInfo.name), hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium(
fieldInfo.name,
color: AFThemeExtension.of(context).textColor,
),
onTap: () => onTap(fieldInfo), onTap: () => onTap(fieldInfo),
leftIcon: svgWidget( leftIcon: svgWidget(
fieldInfo.fieldType.iconName(), fieldInfo.fieldType.iconName(),
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
); );
} }

View File

@ -37,7 +37,10 @@ class SortChoiceButton extends StatelessWidget {
return FlowyButton( return FlowyButton(
decoration: decoration, decoration: decoration,
useIntrinsicWidth: true, useIntrinsicWidth: true,
text: FlowyText(text), text: FlowyText(
text,
color: AFThemeExtension.of(context).textColor,
),
margin: const EdgeInsets.symmetric(horizontal: 8, vertical: 2), margin: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
radius: BorderRadius.all(radius), radius: BorderRadius.all(radius),
leftIcon: leftIcon, leftIcon: leftIcon,

View File

@ -125,7 +125,7 @@ class _SortItem extends StatelessWidget {
hoverColor: AFThemeExtension.of(context).lightGreyHover, hoverColor: AFThemeExtension.of(context).lightGreyHover,
icon: svgWidget( icon: svgWidget(
"home/close", "home/close",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
); );
@ -182,13 +182,11 @@ class _AddSortButtonState extends State<_AddSortButton> {
child: SizedBox( child: SizedBox(
height: GridSize.popoverItemHeight, height: GridSize.popoverItemHeight,
child: FlowyButton( child: FlowyButton(
hoverColor: AFThemeExtension.of(context).greyHover,
disable: getCreatableSorts(widget.fieldController.fieldInfos).isEmpty, disable: getCreatableSorts(widget.fieldController.fieldInfos).isEmpty,
text: FlowyText.medium(LocaleKeys.grid_sort_addSort.tr()), text: FlowyText.medium(LocaleKeys.grid_sort_addSort.tr()),
onTap: () => _popoverController.show(), onTap: () => _popoverController.show(),
leftIcon: svgWidget( leftIcon: const FlowySvg(name: 'home/add'),
"home/add",
color: Theme.of(context).colorScheme.onSurface,
),
), ),
), ),
popupBuilder: (BuildContext context) { popupBuilder: (BuildContext context) {
@ -220,10 +218,7 @@ class _DeleteSortButton extends StatelessWidget {
.read<SortEditorBloc>() .read<SortEditorBloc>()
.add(const SortEditorEvent.deleteAllSorts()); .add(const SortEditorEvent.deleteAllSorts());
}, },
leftIcon: svgWidget( leftIcon: const FlowySvg(name: 'editor/delete'),
"editor/delete",
color: Theme.of(context).colorScheme.onSurface,
),
), ),
); );
}, },

View File

@ -55,13 +55,16 @@ class SortChoiceChip extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final arrow = Transform.rotate( final arrow = Transform.rotate(
angle: -math.pi / 2, angle: -math.pi / 2,
child: svgWidget("home/arrow_left"), child: svgWidget(
"home/arrow_left",
color: Theme.of(context).iconTheme.color,
),
); );
final text = LocaleKeys.grid_settings_sort.tr(); final text = LocaleKeys.grid_settings_sort.tr();
final leftIcon = svgWidget( final leftIcon = svgWidget(
"grid/setting/sort", "grid/setting/sort",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
); );
return SizedBox( return SizedBox(

View File

@ -25,7 +25,7 @@ class _FilterButtonState extends State<FilterButton> {
return BlocBuilder<GridFilterMenuBloc, GridFilterMenuState>( return BlocBuilder<GridFilterMenuBloc, GridFilterMenuState>(
builder: (context, state) { builder: (context, state) {
final textColor = state.filters.isEmpty final textColor = state.filters.isEmpty
? null ? AFThemeExtension.of(context).textColor
: Theme.of(context).colorScheme.primary; : Theme.of(context).colorScheme.primary;
return _wrapPopover( return _wrapPopover(

View File

@ -82,7 +82,7 @@ class _GridGroupCell extends StatelessWidget {
text: FlowyText.medium(fieldInfo.name), text: FlowyText.medium(fieldInfo.name),
leftIcon: svgWidget( leftIcon: svgWidget(
fieldInfo.fieldType.iconName(), fieldInfo.fieldType.iconName(),
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
rightIcon: rightIcon, rightIcon: rightIcon,
onTap: () { onTap: () {

View File

@ -5,6 +5,7 @@ import 'package:appflowy/plugins/database_view/grid/presentation/widgets/header/
import 'package:appflowy/startup/startup.dart'; import 'package:appflowy/startup/startup.dart';
import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
@ -96,7 +97,7 @@ class _GridPropertyCellState extends State<_GridPropertyCell> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final checkmark = svgWidget( final checkmark = svgWidget(
widget.fieldInfo.visibility ? 'home/show' : 'home/hide', widget.fieldInfo.visibility ? 'home/show' : 'home/hide',
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
); );
return SizedBox( return SizedBox(
@ -115,10 +116,14 @@ class _GridPropertyCellState extends State<_GridPropertyCell> {
triggerActions: PopoverTriggerFlags.none, triggerActions: PopoverTriggerFlags.none,
margin: EdgeInsets.zero, margin: EdgeInsets.zero,
child: FlowyButton( child: FlowyButton(
text: FlowyText.medium(widget.fieldInfo.name), hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium(
widget.fieldInfo.name,
color: AFThemeExtension.of(context).textColor,
),
leftIcon: svgWidget( leftIcon: svgWidget(
widget.fieldInfo.fieldType.iconName(), widget.fieldInfo.fieldType.iconName(),
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
rightIcon: FlowyIconButton( rightIcon: FlowyIconButton(
hoverColor: Colors.transparent, hoverColor: Colors.transparent,

View File

@ -2,6 +2,7 @@ import 'package:appflowy/plugins/database_view/application/field/field_controlle
import 'package:appflowy/plugins/database_view/application/setting/setting_bloc.dart'; import 'package:appflowy/plugins/database_view/application/setting/setting_bloc.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/style_widget/button.dart'; import 'package:flowy_infra_ui/style_widget/button.dart';
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart'; import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
import 'package:flowy_infra_ui/style_widget/text.dart'; import 'package:flowy_infra_ui/style_widget/text.dart';
@ -71,14 +72,17 @@ class _SettingItem extends StatelessWidget {
return SizedBox( return SizedBox(
height: GridSize.popoverItemHeight, height: GridSize.popoverItemHeight,
child: FlowyButton( child: FlowyButton(
hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText.medium( text: FlowyText.medium(
action.title(), action.title(),
color: action.enable() ? null : Theme.of(context).disabledColor, color: action.enable()
? AFThemeExtension.of(context).textColor
: Theme.of(context).disabledColor,
), ),
onTap: () => onAction(action), onTap: () => onAction(action),
leftIcon: svgWidget( leftIcon: svgWidget(
action.iconName(), action.iconName(),
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
), ),
); );

View File

@ -52,6 +52,7 @@ class _SettingButtonState extends State<SettingButton> {
triggerActions: PopoverTriggerFlags.none, triggerActions: PopoverTriggerFlags.none,
child: FlowyTextButton( child: FlowyTextButton(
LocaleKeys.settings_title.tr(), LocaleKeys.settings_title.tr(),
fontColor: AFThemeExtension.of(context).textColor,
fillColor: Colors.transparent, fillColor: Colors.transparent,
hoverColor: AFThemeExtension.of(context).lightGreyHover, hoverColor: AFThemeExtension.of(context).lightGreyHover,
padding: GridSize.typeOptionContentInsets, padding: GridSize.typeOptionContentInsets,

View File

@ -24,7 +24,7 @@ class _SortButtonState extends State<SortButton> {
return BlocBuilder<SortMenuBloc, SortMenuState>( return BlocBuilder<SortMenuBloc, SortMenuState>(
builder: (context, state) { builder: (context, state) {
final textColor = state.sortInfos.isEmpty final textColor = state.sortInfos.isEmpty
? null ? AFThemeExtension.of(context).textColor
: Theme.of(context).colorScheme.primary; : Theme.of(context).colorScheme.primary;
return wrapPopover( return wrapPopover(

View File

@ -232,7 +232,7 @@ class _CardMoreOption extends StatelessWidget with CardAccessory {
padding: const EdgeInsets.all(3.0), padding: const EdgeInsets.all(3.0),
child: svgWidget( child: svgWidget(
'grid/details', 'grid/details',
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
); );
} }
@ -254,7 +254,7 @@ class _CardEditOption extends StatelessWidget with CardAccessory {
padding: const EdgeInsets.all(3.0), padding: const EdgeInsets.all(3.0),
child: svgWidget( child: svgWidget(
'editor/edit', 'editor/edit',
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
); );
} }

View File

@ -3,11 +3,9 @@ import 'package:flowy_infra/image.dart';
import 'package:flowy_infra_ui/style_widget/hover.dart'; import 'package:flowy_infra_ui/style_widget/hover.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:flowy_infra/size.dart';
import 'package:styled_widget/styled_widget.dart'; import 'package:styled_widget/styled_widget.dart';
import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:textstyle_extensions/textstyle_extensions.dart';
import '../cell_builder.dart'; import '../cell_builder.dart';
@ -69,7 +67,6 @@ class _PrimaryCellAccessoryState extends State<PrimaryCellAccessory>
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Tooltip( return Tooltip(
message: LocaleKeys.tooltip_openAsPage.tr(), message: LocaleKeys.tooltip_openAsPage.tr(),
textStyle: AFThemeExtension.of(context).caption.textColor(Colors.white),
child: svgWidget( child: svgWidget(
"grid/expander", "grid/expander",
color: Theme.of(context).colorScheme.primary, color: Theme.of(context).colorScheme.primary,
@ -125,7 +122,6 @@ class _AccessoryHoverState extends State<AccessoryHover> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
List<Widget> children = [ List<Widget> children = [
const _Background(),
Padding(padding: widget.contentPadding, child: widget.child), Padding(padding: widget.contentPadding, child: widget.child),
]; ];
@ -173,28 +169,6 @@ class AccessoryHoverState extends ChangeNotifier {
bool get onHover => _onHover; bool get onHover => _onHover;
} }
class _Background extends StatelessWidget {
const _Background({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Consumer<AccessoryHoverState>(
builder: (context, state, child) {
if (state.onHover) {
return FlowyHoverContainer(
style: HoverStyle(
borderRadius: Corners.s6Border,
hoverColor: AFThemeExtension.of(context).lightGreyHover,
),
);
} else {
return const SizedBox();
}
},
);
}
}
class CellAccessoryContainer extends StatelessWidget { class CellAccessoryContainer extends StatelessWidget {
final List<GridCellAccessoryBuilder> accessories; final List<GridCellAccessoryBuilder> accessories;
const CellAccessoryContainer({required this.accessories, Key? key}) const CellAccessoryContainer({required this.accessories, Key? key})

View File

@ -1,6 +1,7 @@
import 'package:appflowy/plugins/database_view/application/cell/cell_controller_builder.dart'; import 'package:appflowy/plugins/database_view/application/cell/cell_controller_builder.dart';
import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
@ -116,7 +117,11 @@ class _ChecklistOptionCellState extends State<_ChecklistOptionCell> {
children: [ children: [
Expanded( Expanded(
child: FlowyButton( child: FlowyButton(
text: FlowyText(widget.option.data.name), hoverColor: AFThemeExtension.of(context).lightGreyHover,
text: FlowyText(
widget.option.data.name,
color: AFThemeExtension.of(context).textColor,
),
leftIcon: icon, leftIcon: icon,
onTap: () => context onTap: () => context
.read<ChecklistCellEditorBloc>() .read<ChecklistCellEditorBloc>()
@ -132,12 +137,13 @@ class _ChecklistOptionCellState extends State<_ChecklistOptionCell> {
Widget _disclosureButton() { Widget _disclosureButton() {
return FlowyIconButton( return FlowyIconButton(
hoverColor: AFThemeExtension.of(context).lightGreyHover,
width: 20, width: 20,
onPressed: () => _popoverController.show(), onPressed: () => _popoverController.show(),
iconPadding: const EdgeInsets.fromLTRB(2, 2, 2, 2), iconPadding: const EdgeInsets.fromLTRB(2, 2, 2, 2),
icon: svgWidget( icon: svgWidget(
"editor/details", "editor/details",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
); );
} }

View File

@ -20,7 +20,7 @@ class ChecklistProgressBar extends StatelessWidget {
percent: percent, percent: percent,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
progressColor: Theme.of(context).colorScheme.primary, progressColor: Theme.of(context).colorScheme.primary,
backgroundColor: AFThemeExtension.of(context).tint9, backgroundColor: AFThemeExtension.of(context).progressBarBGcolor,
barRadius: const Radius.circular(5), barRadius: const Radius.circular(5),
); );
} }

View File

@ -23,9 +23,8 @@ import '../../../../grid/presentation/widgets/common/type_option_separator.dart'
import '../../../../grid/presentation/widgets/header/type_option/date.dart'; import '../../../../grid/presentation/widgets/header/type_option/date.dart';
import 'date_cal_bloc.dart'; import 'date_cal_bloc.dart';
final kToday = DateTime.now(); final kFirstDay = DateTime.utc(1970, 1, 1);
final kFirstDay = DateTime(kToday.year, kToday.month - 3, kToday.day); final kLastDay = DateTime.utc(2100, 1, 1);
final kLastDay = DateTime(kToday.year, kToday.month + 3, kToday.day);
class DateCellEditor extends StatefulWidget { class DateCellEditor extends StatefulWidget {
final VoidCallback onDismissed; final VoidCallback onDismissed;
@ -174,13 +173,13 @@ class _CellCalendarWidgetState extends State<_CellCalendarWidget> {
leftChevronPadding: EdgeInsets.zero, leftChevronPadding: EdgeInsets.zero,
leftChevronIcon: svgWidget( leftChevronIcon: svgWidget(
"home/arrow_left", "home/arrow_left",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
rightChevronPadding: EdgeInsets.zero, rightChevronPadding: EdgeInsets.zero,
rightChevronMargin: EdgeInsets.zero, rightChevronMargin: EdgeInsets.zero,
rightChevronIcon: svgWidget( rightChevronIcon: svgWidget(
"home/arrow_right", "home/arrow_right",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
headerMargin: const EdgeInsets.only(bottom: 8.0), headerMargin: const EdgeInsets.only(bottom: 8.0),
), ),
@ -255,7 +254,7 @@ class _IncludeTimeButton extends StatelessWidget {
children: [ children: [
svgWidget( svgWidget(
"grid/clock", "grid/clock",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
const HSpace(4), const HSpace(4),
FlowyText.medium(LocaleKeys.grid_field_includeTime.tr()), FlowyText.medium(LocaleKeys.grid_field_includeTime.tr()),
@ -386,10 +385,7 @@ class _DateTypeOptionButton extends StatelessWidget {
child: FlowyButton( child: FlowyButton(
text: FlowyText.medium(title), text: FlowyText.medium(title),
margin: GridSize.typeOptionContentInsets, margin: GridSize.typeOptionContentInsets,
rightIcon: svgWidget( rightIcon: const FlowySvg(name: 'grid/more'),
"grid/more",
color: Theme.of(context).colorScheme.onSurface,
),
), ),
), ),
), ),

View File

@ -106,7 +106,11 @@ class SelectOptionTag extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Flexible( Flexible(
child: FlowyText.medium(name, overflow: TextOverflow.ellipsis), child: FlowyText.medium(
name,
overflow: TextOverflow.ellipsis,
color: Theme.of(context).colorScheme.onSurface,
),
), ),
if (onRemove != null) if (onRemove != null)
FlowyIconButton( FlowyIconButton(
@ -139,6 +143,9 @@ class SelectOptionTagCell extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return FlowyHover( return FlowyHover(
style: HoverStyle(
hoverColor: AFThemeExtension.of(context).lightGreyHover,
),
child: InkWell( child: InkWell(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,

View File

@ -210,7 +210,7 @@ class _CreateOptionCell extends StatelessWidget {
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: SelectOptionTag( child: SelectOptionTag(
name: name, name: name,
color: AFThemeExtension.of(context).lightGreyHover, color: AFThemeExtension.of(context).greyHover,
onSelected: () => context onSelected: () => context
.read<SelectOptionCellEditorBloc>() .read<SelectOptionCellEditorBloc>()
.add(SelectOptionEditorEvent.newOption(name)), .add(SelectOptionEditorEvent.newOption(name)),
@ -277,7 +277,7 @@ class _SelectOptionCellState extends State<_SelectOptionCell> {
iconPadding: const EdgeInsets.symmetric(horizontal: 6.0), iconPadding: const EdgeInsets.symmetric(horizontal: 6.0),
icon: svgWidget( icon: svgWidget(
"editor/details", "editor/details",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
), ),
], ],

View File

@ -5,6 +5,7 @@ import 'package:appflowy/workspace/presentation/home/toast.dart';
import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/image.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
@ -211,10 +212,8 @@ class _EditURLAccessoryState extends State<_EditURLAccessory>
controller: _popoverController, controller: _popoverController,
direction: PopoverDirection.bottomWithLeftAligned, direction: PopoverDirection.bottomWithLeftAligned,
offset: const Offset(0, 8), offset: const Offset(0, 8),
child: svgWidget( child: svgWidget("editor/edit",
"editor/edit", color: AFThemeExtension.of(context).textColor),
color: Theme.of(context).colorScheme.onSurface,
),
popupBuilder: (BuildContext popoverContext) { popupBuilder: (BuildContext popoverContext) {
return URLEditorPopover( return URLEditorPopover(
cellController: cellController:
@ -246,7 +245,7 @@ class _CopyURLAccessoryState extends State<_CopyURLAccessory>
Widget build(BuildContext context) { Widget build(BuildContext context) {
return svgWidget( return svgWidget(
"editor/copy", "editor/copy",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
); );
} }

View File

@ -103,7 +103,7 @@ class _CloseButton extends StatelessWidget {
iconPadding: const EdgeInsets.fromLTRB(2, 2, 2, 2), iconPadding: const EdgeInsets.fromLTRB(2, 2, 2, 2),
icon: svgWidget( icon: svgWidget(
"home/close", "home/close",
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
); );
} }

View File

@ -8,9 +8,8 @@ import 'package:appflowy_backend/protobuf/flowy-document/entities.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-user/user_profile.pbserver.dart'; import 'package:appflowy_backend/protobuf/flowy-user/user_profile.pbserver.dart';
import 'package:appflowy_editor/appflowy_editor.dart' import 'package:appflowy_editor/appflowy_editor.dart'
show EditorState, Document, Transaction, Node; show EditorState, Document, Transaction, Node;
import 'package:appflowy_backend/protobuf/flowy-folder/trash.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:appflowy_backend/log.dart'; import 'package:appflowy_backend/log.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
@ -49,8 +48,7 @@ class DocumentBloc extends Bloc<DocumentEvent, DocumentState> {
emit(state.copyWith(isDeleted: false)); emit(state.copyWith(isDeleted: false));
}, },
deletePermanently: (DeletePermanently value) async { deletePermanently: (DeletePermanently value) async {
final result = await _trashService final result = await _trashService.deleteViews([view.id]);
.deleteViews([Tuple2(view.id, TrashType.TrashView)]);
final newState = result.fold( final newState = result.fold(
(l) => state.copyWith(forceClose: true), (r) => state); (l) => state.copyWith(forceClose: true), (r) => state);

View File

@ -1,7 +1,7 @@
import 'package:dartz/dartz.dart'; import 'package:dartz/dartz.dart';
import 'package:appflowy_backend/dispatch/dispatch.dart'; import 'package:appflowy_backend/dispatch/dispatch.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-document/entities.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-document/entities.pb.dart';

View File

@ -5,7 +5,7 @@ import 'package:appflowy/plugins/document/presentation/plugins/parsers/divider_n
import 'package:appflowy/plugins/document/presentation/plugins/parsers/math_equation_node_parser.dart'; import 'package:appflowy/plugins/document/presentation/plugins/parsers/math_equation_node_parser.dart';
import 'package:appflowy/plugins/document/presentation/plugins/parsers/code_block_node_parser.dart'; import 'package:appflowy/plugins/document/presentation/plugins/parsers/code_block_node_parser.dart';
import 'package:appflowy_backend/protobuf/flowy-document/entities.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-document/entities.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';

View File

@ -3,7 +3,7 @@ import 'package:dartz/dartz.dart';
import 'package:appflowy_backend/dispatch/dispatch.dart'; import 'package:appflowy_backend/dispatch/dispatch.dart';
import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
import 'package:appflowy_backend/protobuf/flowy-document/protobuf.dart'; import 'package:appflowy_backend/protobuf/flowy-document/protobuf.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
class ShareService { class ShareService {
Future<Either<ExportDataPB, FlowyError>> export( Future<Either<ExportDataPB, FlowyError>> export(

View File

@ -10,7 +10,7 @@ import 'package:appflowy/startup/plugin/plugin.dart';
import 'package:appflowy/workspace/presentation/home/home_stack.dart'; import 'package:appflowy/workspace/presentation/home/home_stack.dart';
import 'package:appflowy/workspace/presentation/widgets/left_bar_item.dart'; import 'package:appflowy/workspace/presentation/widgets/left_bar_item.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
@ -34,7 +34,7 @@ class DocumentPluginBuilder extends PluginBuilder {
PluginType get pluginType => PluginType.editor; PluginType get pluginType => PluginType.editor;
@override @override
ViewLayoutTypePB? get layoutType => ViewLayoutTypePB.Document; ViewLayoutPB? get layoutType => ViewLayoutPB.Document;
} }
class DocumentPlugin extends Plugin<int> { class DocumentPlugin extends Plugin<int> {

View File

@ -1,5 +1,5 @@
import 'package:appflowy/plugins/document/presentation/plugins/board/board_view_menu_item.dart'; import 'package:appflowy/plugins/document/presentation/plugins/board/board_view_menu_item.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
import 'package:appflowy_editor_plugins/appflowy_editor_plugins.dart'; import 'package:appflowy_editor_plugins/appflowy_editor_plugins.dart';
import 'package:appflowy_editor/appflowy_editor.dart'; import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:appflowy/plugins/document/presentation/plugins/board/board_node_widget.dart'; import 'package:appflowy/plugins/document/presentation/plugins/board/board_node_widget.dart';

View File

@ -34,7 +34,8 @@ class DocumentBanner extends StatelessWidget {
contentPadding: EdgeInsets.zero, contentPadding: EdgeInsets.zero,
bgColor: Colors.transparent, bgColor: Colors.transparent,
hoverColor: Theme.of(context).colorScheme.primary, hoverColor: Theme.of(context).colorScheme.primary,
downColor: Theme.of(context).colorScheme.primaryContainer, highlightColor:
Theme.of(context).colorScheme.primaryContainer,
outlineColor: Colors.white, outlineColor: Colors.white,
borderRadius: Corners.s8Border, borderRadius: Corners.s8Border,
onPressed: onRestore, onPressed: onRestore,
@ -50,7 +51,7 @@ class DocumentBanner extends StatelessWidget {
contentPadding: EdgeInsets.zero, contentPadding: EdgeInsets.zero,
bgColor: Colors.transparent, bgColor: Colors.transparent,
hoverColor: Theme.of(context).colorScheme.primaryContainer, hoverColor: Theme.of(context).colorScheme.primaryContainer,
downColor: Theme.of(context).colorScheme.primary, highlightColor: Theme.of(context).colorScheme.primary,
outlineColor: Colors.white, outlineColor: Colors.white,
borderRadius: Corners.s8Border, borderRadius: Corners.s8Border,
onPressed: onDelete, onPressed: onDelete,

View File

@ -32,6 +32,7 @@ class _FontSizeSwitcherState extends State<FontSizeSwitcher> {
FlowyText.semibold( FlowyText.semibold(
LocaleKeys.moreAction_fontSize.tr(), LocaleKeys.moreAction_fontSize.tr(),
fontSize: 12, fontSize: 12,
color: Theme.of(context).colorScheme.tertiary,
), ),
const SizedBox( const SizedBox(
height: 5, height: 5,
@ -43,9 +44,8 @@ class _FontSizeSwitcherState extends State<FontSizeSwitcher> {
_updateSelectedFontSize(_fontSizes[index].item2); _updateSelectedFontSize(_fontSizes[index].item2);
}, },
borderRadius: const BorderRadius.all(Radius.circular(5)), borderRadius: const BorderRadius.all(Radius.circular(5)),
selectedBorderColor: Theme.of(context).colorScheme.primaryContainer, selectedColor: Theme.of(context).colorScheme.tertiary,
selectedColor: Theme.of(context).colorScheme.onSurface, fillColor: Theme.of(context).colorScheme.primary,
fillColor: Theme.of(context).colorScheme.primaryContainer,
color: Theme.of(context).hintColor, color: Theme.of(context).hintColor,
constraints: const BoxConstraints( constraints: const BoxConstraints(
minHeight: 40.0, minHeight: 40.0,

View File

@ -28,7 +28,7 @@ class DocumentMoreButton extends StatelessWidget {
child: svgWidget( child: svgWidget(
'editor/details', 'editor/details',
size: const Size(18, 18), size: const Size(18, 18),
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).iconTheme.color,
), ),
); );
} }

Some files were not shown because too many files have changed in this diff Show More