fix(electron): sync settings from localStorage -> atom -> electron (#5020)

- moved `appSettingAtom` to infra since we now have different packages that depends on it. There is no better place to fit in for now
- use atomEffect to sync setting changes to updater related configs to Electron side
- refactored how Electron reacts to updater config changes.
This commit is contained in:
Peng Xiao
2023-12-08 03:20:02 +00:00
parent 453d4db713
commit fcd43033fe
30 changed files with 441 additions and 343 deletions
+4 -1
View File
@@ -402,6 +402,7 @@ __metadata:
intl-segmenter-polyfill-rs: "npm:^0.1.6"
jotai: "npm:^2.5.1"
jotai-devtools: "npm:^0.7.0"
jotai-effect: "npm:^0.2.3"
lit: "npm:^3.0.2"
lodash-es: "npm:^4.17.21"
lottie-web: "npm:^5.12.2"
@@ -524,7 +525,6 @@ __metadata:
peerDependencies:
"@affine/templates": "workspace:*"
"@blocksuite/global": 0.0.0-20230409084303-221991d4-nightly
"@toeverything/infra": "workspace:*"
languageName: unknown
linkType: soft
@@ -13665,12 +13665,14 @@ __metadata:
"@blocksuite/presets": "npm:0.11.0-nightly-202312070955-2b5bb47"
"@blocksuite/store": "npm:0.11.0-nightly-202312070955-2b5bb47"
"@testing-library/react": "npm:^14.0.0"
"@toeverything/infra": "workspace:*"
"@types/image-blob-reduce": "npm:^4.1.3"
"@types/lodash.debounce": "npm:^4.0.7"
fake-indexeddb: "npm:^5.0.0"
foxact: "npm:^0.2.20"
image-blob-reduce: "npm:^4.1.0"
jotai: "npm:^2.5.1"
jotai-effect: "npm:^0.2.3"
lodash.debounce: "npm:^4.0.8"
p-queue: "npm:^7.4.1"
react: "npm:18.2.0"
@@ -13709,6 +13711,7 @@ __metadata:
resolution: "@toeverything/infra@workspace:packages/common/infra"
dependencies:
"@affine-test/fixtures": "workspace:*"
"@affine/env": "workspace:*"
"@affine/sdk": "workspace:*"
"@affine/templates": "workspace:*"
"@blocksuite/blocks": "npm:0.11.0-nightly-202312070955-2b5bb47"