diff options
Diffstat (limited to 'packages/main/src/stores/GlobalSettings.ts')
-rw-r--r-- | packages/main/src/stores/GlobalSettings.ts | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/packages/main/src/stores/GlobalSettings.ts b/packages/main/src/stores/GlobalSettings.ts index 1eb13b3..0a54aa3 100644 --- a/packages/main/src/stores/GlobalSettings.ts +++ b/packages/main/src/stores/GlobalSettings.ts | |||
@@ -19,18 +19,24 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | import { | 21 | import { |
22 | globalSettings as originalGlobalSettings, | 22 | GlobalSettings as GlobalSettingsBase, |
23 | ThemeSource, | 23 | ThemeSource, |
24 | } from '@sophie/shared'; | 24 | } from '@sophie/shared'; |
25 | import { Instance } from 'mobx-state-tree'; | 25 | import { Instance } from 'mobx-state-tree'; |
26 | 26 | ||
27 | export const globalSettings = originalGlobalSettings.actions((self) => ({ | 27 | const GlobalSettings = GlobalSettingsBase.actions((self) => ({ |
28 | setThemeSource(mode: ThemeSource): void { | 28 | setThemeSource(mode: ThemeSource): void { |
29 | self.themeSource = mode; | 29 | self.themeSource = mode; |
30 | }, | 30 | }, |
31 | })); | 31 | })); |
32 | 32 | ||
33 | export interface GlobalSettings extends Instance<typeof globalSettings> {} | 33 | /* |
34 | eslint-disable-next-line @typescript-eslint/no-redeclare -- | ||
35 | Intentionally naming the type the same as the store definition. | ||
36 | */ | ||
37 | interface GlobalSettings extends Instance<typeof GlobalSettings> {} | ||
38 | |||
39 | export default GlobalSettings; | ||
34 | 40 | ||
35 | export type { | 41 | export type { |
36 | GlobalSettingsSnapshotIn, | 42 | GlobalSettingsSnapshotIn, |