aboutsummaryrefslogtreecommitdiffstats
path: root/packages/shared/src/stores/SharedStore.ts
Commit message (Collapse)AuthorAge
* refactor: Shared model type factoriesLibravatar Kristóf Marussy2022-03-06
| | | | | | | | | | | | | | | Allows customization of stores both in the renderer and in the main process. Instead of exposing a basic model type from the shared module (which was be overwritted with more specific props in the main package), we expose factory function that can create specific model types in both the renderer and the main process. Using these package-specific customization to stores, the renderer package can attach IPC calls directly to store objects, which the main package can attach the handlers for IPC calls and other internal actions. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* feat: Save selected service to fileLibravatar Kristóf Marussy2022-02-08
| | | | | | | Sophie start off from the service that was selected when it was last open. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* chore: Annotate shared packages for purityLibravatar Kristóf Marussy2022-02-08
| | | | | | | Enabled better tree shaking and smaller bundle sizes by excluding mobx-state-tree and zod dependencies whenever possible. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* refactor: Coding conventionsLibravatar Kristóf Marussy2022-02-08
| | | | | | | | | Make sure that files have a default import with the same name as the file whenever possible to reduce surprise. Also shuffles around some file names for better legibility. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* refactor: Apply shared store patches in batchesLibravatar Kristóf Marussy2022-02-08
| | | | | | Makes sure that the renderer always sees a consistent state. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* refactor: Store services in a mapLibravatar Kristóf Marussy2022-02-08
| | | | | | | Makes the synchronization of references across the main/renderer process boundary more robust. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* refactor: Move runtime state into shared modelsLibravatar Kristóf Marussy2022-02-08
| | | | | | | | | | | Now the runtime state lives inside the model (instead of being associated to the static settings via a map), which simplifies state management. Static settings are now located inside the runtime models, so we must create tests to make sure that the settings are being persisted correctly. The contents of the config file are now generated as a view of store (instead of a snapshot), which adds flexibility. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* feat: Add selected service field to SharedStoreLibravatar Kristóf Marussy2022-02-08
| | | | | | Lets the main process see which service is currently selected. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* feat: Add RuntimeService storeLibravatar Kristóf Marussy2022-02-08
| | | | | | | Stores transient state for services shared between the main and renderer processes. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* build: Add prettierLibravatar Kristóf Marussy2022-01-09
| | | | | | | eslint will also enforce prettier rules, so there is no need to call prettier separately in CI. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* New configurations based on review comments (WIP)Libravatar Vijay A2022-01-09
| | | | Signed-off-by: Vijay A <vraravam@users.noreply.github.com>
* chore: Add import extensions preparing for ts 4.6 nodenextLibravatar Kristóf Marussy2021-12-31
|
* refactor: Inversion of control with typed-injectLibravatar Kristóf Marussy2021-12-27
|
* refactor: Make all stores optionalLibravatar Kristóf Marussy2021-12-26
| | | | | | This reduces boilerplate and helps with config file robustness: if a field is missing from the config file, it will be replaced with its default value.
* feat: Set nativeTheme theme source on dark modeLibravatar Kristóf Marussy2021-12-26
|
* refactor: Simplify browserViewBounds handlingLibravatar Kristóf Marussy2021-12-26
|
* feat: Add BrowserView and synchronize its positionLibravatar Kristóf Marussy2021-12-23
|
* chore: Add license headersLibravatar Kristóf Marussy2021-12-23
| | | | | Centralizes vite configuration to be able to add license banners to outputs in one place.
* feat: Add react and mobx integrationLibravatar Kristóf Marussy2021-12-23
|
* feat: Main to renderer store synchronizationLibravatar Kristóf Marussy2021-12-23
Patches are send in one direction only, from the main to the renderer, so all actions have to go through the context bridge and the renderer IPC to modify the store in the renderer. This makes the store in the main process a single source of truth, which simplifies debugging and state persistence. The store in the renderer is connected to redux devtools for inspection, but playing back the state in the devtools won't change the sotre in main process.