AFFiNE/packages/frontend/electron
JimmFly 23518cae16
feat(core): add manual check for updates (#4957)
work for #4523

add `appBuildType` to `runtimeConfig`
add `useAppUpdater` to manage client updates

<!--
copilot:summary
-->
### <samp>🤖[[deprecated]](https://githubnext.com/copilot-for-prs-sunset) Generated by Copilot at cdd012c</samp>

This pull request refactors and enhances the update functionality for the frontend. It introduces a new custom hook `useAppUpdater` that simplifies the update logic and state management, and uses it in various components and commands. It also adds more options and feedback for the user to control and monitor the update process, such as manual download, auto-check, and auto-download toggles, and update status and progress indicators. It also updates the `AboutAffine` component to show the app icon, version, and build type. It also adds new translations, dependencies, types, and schemas related to the update functionality.

<img width="1073" alt="image" src="https://github.com/toeverything/AFFiNE/assets/102217452/16ae7a6a-0035-4e57-902b-6b8f63169501">
2023-11-29 13:31:25 +00:00
..
resources fix(electron): update app icons (#4789) 2023-10-31 09:09:42 +00:00
scripts ci: always perform fresh build in deployment job (#5066) 2023-11-28 06:59:50 +00:00
src feat(core): add manual check for updates (#4957) 2023-11-29 13:31:25 +00:00
test refactor(electron): fix vitest and add behavior test (#4655) 2023-10-18 22:14:30 -05: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): asar (#4965) 2023-11-21 17:44:30 +00:00
package.json chore: bump blocksuite (#5051) 2023-11-27 04:46:23 +00:00
project.json refactor(infra): directory structure (#4615) 2023-10-18 15:30:08 +00:00
README.md refactor(infra): directory structure (#4615) 2023-10-18 15:30:08 +00:00
tsconfig.json refactor(electron): fix vitest and add behavior test (#4655) 2023-10-18 22:14:30 -05:00
tsconfig.node.json refactor(infra): directory structure (#4615) 2023-10-18 15:30:08 +00:00
tsconfig.test.json refactor(electron): fix vitest and add behavior test (#4655) 2023-10-18 22:14:30 -05:00
vitest.config.ts refactor(electron): fix vitest and add behavior test (#4655) 2023-10-18 22:14:30 -05: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