aboutsummaryrefslogtreecommitdiffstats
path: root/packages/main/src/index.ts
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-01-20 19:13:45 +0100
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-02-08 21:43:16 +0100
commitcef1c2fd221e81424195026645386370662ef398 (patch)
tree77fc9d044adef735adb2c2acc0ba3e74858aa1f8 /packages/main/src/index.ts
parentrefactor: Rename main services to infrastructure (diff)
downloadsophie-cef1c2fd221e81424195026645386370662ef398.tar.gz
sophie-cef1c2fd221e81424195026645386370662ef398.tar.zst
sophie-cef1c2fd221e81424195026645386370662ef398.zip
feat: Add selected service field to SharedStore
Lets the main process see which service is currently selected. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
Diffstat (limited to 'packages/main/src/index.ts')
-rw-r--r--packages/main/src/index.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/main/src/index.ts b/packages/main/src/index.ts
index ee89f49..66405ea 100644
--- a/packages/main/src/index.ts
+++ b/packages/main/src/index.ts
@@ -269,6 +269,9 @@ async function createWindow(): Promise<unknown> {
269 try { 269 try {
270 const actionToDispatch = action.parse(rawAction); 270 const actionToDispatch = action.parse(rawAction);
271 switch (actionToDispatch.action) { 271 switch (actionToDispatch.action) {
272 case 'set-selected-service-id':
273 store.setSelectedServiceId(actionToDispatch.serviceId);
274 break;
272 case 'set-browser-view-bounds': 275 case 'set-browser-view-bounds':
273 store.setBrowserViewBounds(actionToDispatch.browserViewBounds); 276 store.setBrowserViewBounds(actionToDispatch.browserViewBounds);
274 break; 277 break;