aboutsummaryrefslogtreecommitdiffstats
path: root/packages/shared/src/stores
diff options
context:
space:
mode:
Diffstat (limited to 'packages/shared/src/stores')
-rw-r--r--packages/shared/src/stores/GlobalSettingsBase.ts3
-rw-r--r--packages/shared/src/stores/SharedStoreBase.ts4
2 files changed, 6 insertions, 1 deletions
diff --git a/packages/shared/src/stores/GlobalSettingsBase.ts b/packages/shared/src/stores/GlobalSettingsBase.ts
index 1bd0628..c74c822 100644
--- a/packages/shared/src/stores/GlobalSettingsBase.ts
+++ b/packages/shared/src/stores/GlobalSettingsBase.ts
@@ -30,10 +30,13 @@ import { ThemeSource } from '../schemas/ThemeSource';
30 30
31import ServiceBase from './ServiceBase'; 31import ServiceBase from './ServiceBase';
32 32
33export const SYSTEM_LOCALE = 'system';
34
33export function defineGlobalSettingsModel<TS extends IAnyModelType>( 35export function defineGlobalSettingsModel<TS extends IAnyModelType>(
34 service: TS, 36 service: TS,
35) { 37) {
36 return types.model('GlobalSettings', { 38 return types.model('GlobalSettings', {
39 language: SYSTEM_LOCALE,
37 themeSource: types.optional( 40 themeSource: types.optional(
38 types.enumeration(ThemeSource.options), 41 types.enumeration(ThemeSource.options),
39 'system', 42 'system',
diff --git a/packages/shared/src/stores/SharedStoreBase.ts b/packages/shared/src/stores/SharedStoreBase.ts
index 86bd0fc..a576a0e 100644
--- a/packages/shared/src/stores/SharedStoreBase.ts
+++ b/packages/shared/src/stores/SharedStoreBase.ts
@@ -31,6 +31,8 @@ import GlobalSettingsBase from './GlobalSettingsBase';
31import ProfileBase from './Profile'; 31import ProfileBase from './Profile';
32import ServiceBase from './ServiceBase'; 32import ServiceBase from './ServiceBase';
33 33
34export const FALLBACK_LOCALE = 'en';
35
34export function defineSharedStoreModel< 36export function defineSharedStoreModel<
35 TG extends IAnyModelType, 37 TG extends IAnyModelType,
36 TP extends IAnyModelType, 38 TP extends IAnyModelType,
@@ -43,7 +45,7 @@ export function defineSharedStoreModel<
43 servicesById: types.map(service), 45 servicesById: types.map(service),
44 services: types.array(types.reference(service)), 46 services: types.array(types.reference(service)),
45 shouldUseDarkColors: false, 47 shouldUseDarkColors: false,
46 language: 'en', 48 language: FALLBACK_LOCALE,
47 }); 49 });
48} 50}
49 51