aboutsummaryrefslogtreecommitdiffstats
path: root/packages/main/src/stores/RootStore.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/main/src/stores/RootStore.ts')
-rw-r--r--packages/main/src/stores/RootStore.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/main/src/stores/RootStore.ts b/packages/main/src/stores/RootStore.ts
index 9d138ce..c09cd4a 100644
--- a/packages/main/src/stores/RootStore.ts
+++ b/packages/main/src/stores/RootStore.ts
@@ -27,10 +27,16 @@ import {
27} from '@sophie/shared'; 27} from '@sophie/shared';
28 28
29export const rootStore = types.model('RootStore', { 29export const rootStore = types.model('RootStore', {
30 browserViewBounds: types.model("BrowserViewBoundsStore", {
31 x: 0,
32 y: 0,
33 width: 0,
34 height: 0,
35 }),
30 shared: sharedStore, 36 shared: sharedStore,
31}).actions((self) => ({ 37}).actions((self) => ({
32 setBrowserViewBounds(bounds: BrowserViewBounds) { 38 setBrowserViewBounds(bounds: BrowserViewBounds) {
33 applySnapshot(self.shared.browserViewBounds, bounds); 39 applySnapshot(self.browserViewBounds, bounds);
34 }, 40 },
35 setPaletteMode(mode: PaletteMode) { 41 setPaletteMode(mode: PaletteMode) {
36 self.shared.shouldUseDarkColors = mode === 'dark'; 42 self.shared.shouldUseDarkColors = mode === 'dark';
@@ -41,6 +47,7 @@ export interface RootStore extends Instance<typeof rootStore> {}
41 47
42export function createRootStore(): RootStore { 48export function createRootStore(): RootStore {
43 return rootStore.create({ 49 return rootStore.create({
50 browserViewBounds: {},
44 shared: emptySharedStore, 51 shared: emptySharedStore,
45 }); 52 });
46} 53}