AFFiNE/packages/frontend/electron
akumatus 24cb0d3757
refactor: add docsService for blocksuite to change and observe doc mode (#7200)
This PR provide `DocModeService` to manage document mode, which is used by blocksuite.

### What Changed?
- Add document mode apis from `DocService` and `DocsService`
- Remove useless `pageService.getEditorMode` and `pageService.slots.editorModeSwitch` api

[Related PR in blocksuite](https://github.com/toeverything/blocksuite/pull/7288)

[Bump Blocksuite](https://github.com/toeverything/AFFiNE/pull/7209)
> ## Features
> * [feat(presets): support different tracker control for actions blocksuite#7285](https://github.com/toeverything/blocksuite/pull/7285) @donteatfriedrice
> * [feat(edgeless): add default color and editing border for edgeless text blocksuite#7278](https://github.com/toeverything/blocksuite/pull/7278) @Flrande
> * [feat(blocks): center peek entries blocksuite#7275](https://github.com/toeverything/blocksuite/pull/7275) @pengx17
>
> ## Bugfix
> * [fix(blocks): affine-embed-synced-doc-block peek on dblclick blocksuite#7284](https://github.com/toeverything/blocksuite/pull/7284) @pengx17
> * [fix(edgeless): edgeless text rect should automatically update when changing font blocksuite#7292](https://github.com/toeverything/blocksuite/pull/7292) @Flrande
> * [fix(edgeless): align panel not work blocksuite#7293](https://github.com/toeverything/blocksuite/pull/7293) @Flrande
> * [fix(blocks): filterable list unexpected hover style blocksuite#7291](https://github.com/toeverything/blocksuite/pull/7291) @golok727
> * [fix(blocks): slash menu unexpected hover style blocksuite#7290](https://github.com/toeverything/blocksuite/pull/7290) @golok727
> * [fix(blocks): bookmark block error on undo or delete while loading blocksuite#7276](https://github.com/toeverything/blocksuite/pull/7276) @golok727
> * [fix(presets): chat input max-height blocksuite#7283](https://github.com/toeverything/blocksuite/pull/7283) @fundon
> * [fix(presets): get image blob from selection blocksuite#7286](https://github.com/toeverything/blocksuite/pull/7286) @donteatfriedrice
> * [fix(blocks): connectors resize and rotate blocksuite#7256](https://github.com/toeverything/blocksuite/pull/7256) @fundon
>
> ## Refactor
> * [refactor: add DocModeService for doc mode get, set, toogle and observe change blocksuite#7288](https://github.com/toeverything/blocksuite/pull/7288) @akumatus
> * [refactor(edgeless): rewrite auto-connect component as a widget blocksuite#7287](https://github.com/toeverything/blocksuite/pull/7287) @doouding
>
> ## Misc
> * [test: fix flaky blocksuite#7295](https://github.com/toeverything/blocksuite/pull/7295) @L-Sun
> * [style(page): adjust heading font-weight and letter-spacing blocksuite#7277](https://github.com/toeverything/blocksuite/pull/7277) @CatsJuice
> * [chore: apply member ordering rule blocksuite#7279](https://github.com/toeverything/blocksuite/pull/7279) @Saul-Mirone

---
2024-06-13 16:53:42 +08:00
..
renderer fix(core): fix ui flashing (#7056) 2024-05-27 08:05:20 +00:00
resources build(electron): add nsis script for windows installer (#6674) 2024-04-25 03:30:04 +00:00
scripts build(electron): add nsis build to release-desktop workflow (#6677) 2024-04-25 03:52:27 +00:00
src refactor: find in page (#7086) 2024-05-28 06:19:53 +00:00
test fix(electron): remove all migration code in electron (#6969) 2024-05-17 03:01:14 +00:00
.gitignore refactor(infra): directory structure (#4615) 2023-10-18 15:30:08 +00:00
dev-app-update.yml refactor(infra): directory structure (#4615) 2023-10-18 15:30:08 +00:00
forge.config.mjs build(electron): add nsis script for windows installer (#6674) 2024-04-25 03:30:04 +00:00
package.json refactor: add docsService for blocksuite to change and observe doc mode (#7200) 2024-06-13 16:53:42 +08:00
project.json refactor(infra): remove old plugin system (#5411) 2023-12-27 02:49:59 +00:00
README.md refactor(infra): directory structure (#4615) 2023-10-18 15:30:08 +00:00
tsconfig.json perf(electron): add index for updates (#6951) 2024-05-16 06:30:53 +00:00
tsconfig.node.json feat(electron): define runtimeConfig in esbuild (#6287) 2024-03-25 03:55:26 +00:00
tsconfig.test.json feat(electron): define runtimeConfig in esbuild (#6287) 2024-03-25 03:55:26 +00:00
vitest.config.ts chore(electron): config vitest swc (#6282) 2024-03-25 03:55:23 +00:00

AFFiNE Electron App

Development

To run AFFiNE Desktop Client Application locally, run the following commands:

# in repo root
yarn install
yarn workspace @affine/native build
yarn dev

# in packages/frontend/electron
yarn generate-assets
yarn dev # or yarn prod for production build

Troubleshooting

Credits

Most of the boilerplate code is generously borrowed from the following