@focus8/settings-registry 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +27 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +280 -110
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +466 -45
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,18 @@ export type AllDayPreset = {
|
|
|
49
49
|
daysBefore: number;
|
|
50
50
|
time: string;
|
|
51
51
|
};
|
|
52
|
+
export type SettingUiType = 'TOGGLE' | 'SELECT' | 'VOLUME_SLIDER' | 'SLIDER' | 'NUMBER_INPUT' | 'TEXT_INPUT' | 'PIN_INPUT' | 'CUSTOM_THEME_PICKER' | 'CUSTOM_LANGUAGE_PICKER' | 'CUSTOM_CALENDAR_TYPE' | 'CUSTOM_CLOCK_TYPE' | 'CUSTOM_WEATHER_LOCATION' | 'CUSTOM_IMAGE' | 'CUSTOM_IMAGE_ARRAY' | 'CUSTOM_CALENDAR_IDS' | 'CUSTOM_REMINDER_PRESETS' | 'CUSTOM_EVENT_FORM' | 'CUSTOM_CHRONOLOGICAL_EVENT_FORM' | 'CUSTOM_DISPLAY_DENSITY' | 'CUSTOM_BRIGHTNESS' | 'CUSTOM_SPLIT_VIEW_CONFIG' | 'HIDDEN';
|
|
53
|
+
export type SettingOption<T = unknown> = {
|
|
54
|
+
/** The option value */
|
|
55
|
+
value: T;
|
|
56
|
+
/** i18n message key for the option label */
|
|
57
|
+
labelKey: string;
|
|
58
|
+
};
|
|
59
|
+
export type SliderConfig = {
|
|
60
|
+
min: number;
|
|
61
|
+
max: number;
|
|
62
|
+
step: number;
|
|
63
|
+
};
|
|
52
64
|
export declare const SETTINGS_CATEGORIES: readonly ["appearance", "calendarView", "calendars", "sound", "timer", "media", "lockScreen", "touch", "device", "language", "notification", "chronological", "eventForm", "chronologicalEventForm"];
|
|
53
65
|
export type SettingsCategory = (typeof SETTINGS_CATEGORIES)[number];
|
|
54
66
|
export declare const CATEGORY_LABELS: Record<SettingsCategory, string>;
|
|
@@ -84,6 +96,8 @@ export type SettingsGroupDef = {
|
|
|
84
96
|
keys: string[];
|
|
85
97
|
/** Only show for this calendar type (undefined = always) */
|
|
86
98
|
calendarType?: CalendarType;
|
|
99
|
+
/** Only show for this app mode (undefined = always) */
|
|
100
|
+
appMode?: 'ENROLLED';
|
|
87
101
|
};
|
|
88
102
|
/**
|
|
89
103
|
* Group definitions matching the mobile app's settings structure.
|
|
@@ -119,7 +133,7 @@ export declare const SETTINGS_LABELS: Readonly<Record<string, SettingLabelDef>>;
|
|
|
119
133
|
* buckets them into the standard groups, filtering by calendar type and
|
|
120
134
|
* excluded keys.
|
|
121
135
|
*/
|
|
122
|
-
export declare function groupSettingsForDevice(allSettings: ParsedSettingEntry[], calendarType: CalendarType): {
|
|
136
|
+
export declare function groupSettingsForDevice(allSettings: ParsedSettingEntry[], calendarType: CalendarType, appMode?: 'ENROLLED'): {
|
|
123
137
|
id: SettingsGroupId;
|
|
124
138
|
labelKey: string;
|
|
125
139
|
icon: string;
|
|
@@ -132,6 +146,12 @@ export type SettingDef<T = unknown> = {
|
|
|
132
146
|
default: T;
|
|
133
147
|
/** Whether this setting should be synced to the server. Default true. */
|
|
134
148
|
sync: boolean;
|
|
149
|
+
/** UI component type for rendering this setting */
|
|
150
|
+
uiType: SettingUiType;
|
|
151
|
+
/** Available options for SELECT-type settings */
|
|
152
|
+
options?: readonly SettingOption<T>[];
|
|
153
|
+
/** Slider configuration for SLIDER-type settings */
|
|
154
|
+
sliderConfig?: SliderConfig;
|
|
135
155
|
};
|
|
136
156
|
export type RegistryConfig = {
|
|
137
157
|
/** Whether the device is in enrolled/kiosk mode */
|
|
@@ -304,6 +324,12 @@ export type ParsedSettingEntry = {
|
|
|
304
324
|
descriptionKey?: string;
|
|
305
325
|
/** The setting value */
|
|
306
326
|
value: unknown;
|
|
327
|
+
/** UI component type for rendering this setting */
|
|
328
|
+
uiType: SettingUiType;
|
|
329
|
+
/** Available options for SELECT-type settings */
|
|
330
|
+
options?: readonly SettingOption[];
|
|
331
|
+
/** Slider configuration for SLIDER-type settings */
|
|
332
|
+
sliderConfig?: SliderConfig;
|
|
307
333
|
};
|
|
308
334
|
export type ParsedSettingsGroup = {
|
|
309
335
|
/** The category key */
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AACvD,MAAM,MAAM,UAAU,GAClB,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,CAAC;AACb,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC;AAErC,MAAM,MAAM,YAAY,GAAG,eAAe,GAAG,YAAY,CAAC;AAC1D,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC7C,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,CAAC;AAChD,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AAC9C,eAAO,MAAM,cAAc,EAAE,YAAY,EAAqB,CAAC;AAC/D,MAAM,MAAM,gBAAgB,GACxB,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,OAAO,GACP,UAAU,CAAC;AACf,MAAM,MAAM,uBAAuB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AACnD,MAAM,MAAM,wBAAwB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AACj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mDAAmD;IACnD,MAAM,EAAE,aAAa,CAAC;IACtB,iDAAiD;IACjD,OAAO,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;IACnC,oDAAoD;IACpD,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,uBAAuB;IACvB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,QAAQ,EAAE,kBAAkB,EAAE,CAAC;CAChC,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,YAAY,CAAC,EAAE,YAAY,EAC3B,QAAQ,GAAE,gBAAkC,GAC3C,mBAAmB,EAAE,CA8DvB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAoBzD;AAMD,eAAO,MAAM,eAAe,kBAAyB,CAAC;AAQtD,wBAAgB,sBAAsB,CAAC,MAAM,GAAE,OAAO,CAAC,cAAc,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE1E"}
|
package/dist/index.js
CHANGED
|
@@ -194,12 +194,14 @@ export const SETTINGS_GROUPS = [
|
|
|
194
194
|
'sound.timerAlarmTimeout',
|
|
195
195
|
'timer.',
|
|
196
196
|
],
|
|
197
|
+
appMode: 'ENROLLED',
|
|
197
198
|
},
|
|
198
199
|
{
|
|
199
200
|
id: 'lockScreen',
|
|
200
201
|
labelKey: 'Settings.LockScreen',
|
|
201
202
|
icon: 'Lock',
|
|
202
203
|
keys: ['lockScreen.'],
|
|
204
|
+
appMode: 'ENROLLED',
|
|
203
205
|
},
|
|
204
206
|
{
|
|
205
207
|
id: 'touch',
|
|
@@ -472,9 +474,9 @@ function matchesGroup(key, group) {
|
|
|
472
474
|
* buckets them into the standard groups, filtering by calendar type and
|
|
473
475
|
* excluded keys.
|
|
474
476
|
*/
|
|
475
|
-
export function groupSettingsForDevice(allSettings, calendarType) {
|
|
476
|
-
// Filter excluded
|
|
477
|
-
const settings = allSettings.filter((s) => !EXCLUDED_DEVICE_SETTINGS.has(s.key));
|
|
477
|
+
export function groupSettingsForDevice(allSettings, calendarType, appMode) {
|
|
478
|
+
// Filter excluded and hidden settings
|
|
479
|
+
const settings = allSettings.filter((s) => !EXCLUDED_DEVICE_SETTINGS.has(s.key) && s.uiType !== 'HIDDEN');
|
|
478
480
|
// Calendar type filtering for event form keys
|
|
479
481
|
const isChronological = calendarType === 'chronological';
|
|
480
482
|
const filteredSettings = settings.filter((s) => {
|
|
@@ -493,6 +495,10 @@ export function groupSettingsForDevice(allSettings, calendarType) {
|
|
|
493
495
|
if (group.calendarType && group.calendarType !== calendarType) {
|
|
494
496
|
continue;
|
|
495
497
|
}
|
|
498
|
+
// Skip groups not relevant for current app mode
|
|
499
|
+
if (group.appMode && group.appMode !== appMode) {
|
|
500
|
+
continue;
|
|
501
|
+
}
|
|
496
502
|
const matched = filteredSettings.filter((s) => !claimed.has(s.key) && matchesGroup(s.key, group));
|
|
497
503
|
if (matched.length === 0) {
|
|
498
504
|
continue;
|
|
@@ -516,10 +522,51 @@ export const DEFAULT_REGISTRY_CONFIG = {
|
|
|
516
522
|
defaultLocale: 'nb',
|
|
517
523
|
};
|
|
518
524
|
// ---------------------------------------------------------------------------
|
|
525
|
+
// Shared option arrays (reused across multiple settings)
|
|
526
|
+
// ---------------------------------------------------------------------------
|
|
527
|
+
const ALARM_SOUND_OPTIONS = [
|
|
528
|
+
{ value: 'none', labelKey: 'Settings.Option.AlarmSound.None' },
|
|
529
|
+
{ value: 'alarm1', labelKey: 'Settings.Option.AlarmSound.Alarm1' },
|
|
530
|
+
{ value: 'alarm2', labelKey: 'Settings.Option.AlarmSound.Alarm2' },
|
|
531
|
+
{ value: 'alarm3', labelKey: 'Settings.Option.AlarmSound.Alarm3' },
|
|
532
|
+
{ value: 'alarm4', labelKey: 'Settings.Option.AlarmSound.Alarm4' },
|
|
533
|
+
{ value: 'alarm5', labelKey: 'Settings.Option.AlarmSound.Alarm5' },
|
|
534
|
+
{ value: 'alarm6', labelKey: 'Settings.Option.AlarmSound.Alarm6' },
|
|
535
|
+
{ value: 'alarm7', labelKey: 'Settings.Option.AlarmSound.Alarm7' },
|
|
536
|
+
{ value: 'alarm8', labelKey: 'Settings.Option.AlarmSound.Alarm8' },
|
|
537
|
+
{ value: 'alarm9', labelKey: 'Settings.Option.AlarmSound.Alarm9' },
|
|
538
|
+
];
|
|
539
|
+
const ALARM_TIMEOUT_OPTIONS = [
|
|
540
|
+
{ value: 1, labelKey: 'Settings.Option.AlarmTimeout.1min' },
|
|
541
|
+
{ value: 2, labelKey: 'Settings.Option.AlarmTimeout.2min' },
|
|
542
|
+
{ value: 3, labelKey: 'Settings.Option.AlarmTimeout.3min' },
|
|
543
|
+
{ value: 5, labelKey: 'Settings.Option.AlarmTimeout.5min' },
|
|
544
|
+
{ value: 10, labelKey: 'Settings.Option.AlarmTimeout.10min' },
|
|
545
|
+
];
|
|
546
|
+
const DAY_VIEW_ZOOM_OPTIONS = [
|
|
547
|
+
{ value: 15, labelKey: 'Settings.Option.DayViewZoom.15min' },
|
|
548
|
+
{ value: 30, labelKey: 'Settings.Option.DayViewZoom.30min' },
|
|
549
|
+
{ value: 60, labelKey: 'Settings.Option.DayViewZoom.60min' },
|
|
550
|
+
];
|
|
551
|
+
const TIME_OF_DAY_SLIDER = { min: 0, max: 23, step: 1 };
|
|
552
|
+
// ---------------------------------------------------------------------------
|
|
519
553
|
// Helper
|
|
520
554
|
// ---------------------------------------------------------------------------
|
|
521
|
-
function def(category, type, defaultValue,
|
|
522
|
-
|
|
555
|
+
function def(category, type, defaultValue, uiType, extra) {
|
|
556
|
+
const result = {
|
|
557
|
+
category,
|
|
558
|
+
type,
|
|
559
|
+
default: defaultValue,
|
|
560
|
+
sync: extra?.sync ?? true,
|
|
561
|
+
uiType,
|
|
562
|
+
};
|
|
563
|
+
if (extra?.options) {
|
|
564
|
+
result.options = extra.options;
|
|
565
|
+
}
|
|
566
|
+
if (extra?.sliderConfig) {
|
|
567
|
+
result.sliderConfig = extra.sliderConfig;
|
|
568
|
+
}
|
|
569
|
+
return result;
|
|
523
570
|
}
|
|
524
571
|
// ---------------------------------------------------------------------------
|
|
525
572
|
// Entry builder (internal — used by SettingsRegistry class and factory)
|
|
@@ -529,159 +576,276 @@ function buildEntries(config) {
|
|
|
529
576
|
// ═══════════════════════════════════════════════════════════════════════
|
|
530
577
|
// Appearance
|
|
531
578
|
// ═══════════════════════════════════════════════════════════════════════
|
|
532
|
-
'appearance.theme': def('appearance', 'string', config.defaultTheme
|
|
533
|
-
|
|
534
|
-
|
|
579
|
+
'appearance.theme': def('appearance', 'string', config.defaultTheme, 'CUSTOM_THEME_PICKER', {
|
|
580
|
+
options: [
|
|
581
|
+
{ value: 'light', labelKey: 'Settings.Option.Theme.Light' },
|
|
582
|
+
{ value: 'dark', labelKey: 'Settings.Option.Theme.Dark' },
|
|
583
|
+
{ value: 'system', labelKey: 'Settings.Option.Theme.System' },
|
|
584
|
+
],
|
|
585
|
+
}),
|
|
586
|
+
'appearance.clockType': def('appearance', 'string', 'digital', 'CUSTOM_CLOCK_TYPE', {
|
|
587
|
+
options: [
|
|
588
|
+
{ value: 'digital', labelKey: 'Settings.Option.ClockType.Digital' },
|
|
589
|
+
{ value: 'analog', labelKey: 'Settings.Option.ClockType.Analog' },
|
|
590
|
+
],
|
|
591
|
+
}),
|
|
592
|
+
'appearance.enableDayColors': def('appearance', 'boolean', false, 'TOGGLE'),
|
|
535
593
|
// ═══════════════════════════════════════════════════════════════════════
|
|
536
594
|
// Calendar view
|
|
537
595
|
// ═══════════════════════════════════════════════════════════════════════
|
|
538
|
-
'calendarView.type': def('calendarView', 'string', 'time-based'
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
596
|
+
'calendarView.type': def('calendarView', 'string', 'time-based', 'CUSTOM_CALENDAR_TYPE', {
|
|
597
|
+
options: [
|
|
598
|
+
{
|
|
599
|
+
value: 'chronological',
|
|
600
|
+
labelKey: 'Settings.Option.CalendarType.Chronological',
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
value: 'time-based',
|
|
604
|
+
labelKey: 'Settings.Option.CalendarType.TimeBased',
|
|
605
|
+
},
|
|
606
|
+
],
|
|
607
|
+
}),
|
|
608
|
+
'calendarView.view': def('calendarView', 'string', 'day', 'SELECT', {
|
|
609
|
+
options: [
|
|
610
|
+
{ value: 'day', labelKey: 'Settings.Option.CalendarView.Day' },
|
|
611
|
+
{
|
|
612
|
+
value: '3-days',
|
|
613
|
+
labelKey: 'Settings.Option.CalendarView.3Days',
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
value: '5-days',
|
|
617
|
+
labelKey: 'Settings.Option.CalendarView.5Days',
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
value: '7-days',
|
|
621
|
+
labelKey: 'Settings.Option.CalendarView.7Days',
|
|
622
|
+
},
|
|
623
|
+
{ value: 'week', labelKey: 'Settings.Option.CalendarView.Week' },
|
|
624
|
+
{
|
|
625
|
+
value: 'month',
|
|
626
|
+
labelKey: 'Settings.Option.CalendarView.Month',
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
value: 'overview',
|
|
630
|
+
labelKey: 'Settings.Option.CalendarView.Overview',
|
|
631
|
+
},
|
|
632
|
+
],
|
|
633
|
+
}),
|
|
634
|
+
'calendarView.dayViewZoom': def('calendarView', 'number', 60, 'SELECT', { options: DAY_VIEW_ZOOM_OPTIONS }),
|
|
635
|
+
'calendarView.weekViewZoom': def('calendarView', 'number', 60, 'SELECT', { options: DAY_VIEW_ZOOM_OPTIONS }),
|
|
636
|
+
'calendarView.splitView': def('calendarView', 'boolean', false, 'TOGGLE'),
|
|
637
|
+
'calendarView.showCalendarNames': def('calendarView', 'boolean', true, 'TOGGLE'),
|
|
638
|
+
'calendarView.calendarColumns': def('calendarView', 'json', [], 'CUSTOM_SPLIT_VIEW_CONFIG'),
|
|
639
|
+
'calendarView.autoReturnToTodayEnabled': def('calendarView', 'boolean', config.isEnrolled, 'TOGGLE'),
|
|
640
|
+
'calendarView.autoReturnToTodayTimeoutSeconds': def('calendarView', 'number', 300, 'SLIDER', { sliderConfig: { min: 30, max: 600, step: 30 } }),
|
|
641
|
+
'calendarView.showWeatherOnEvents': def('calendarView', 'boolean', false, 'TOGGLE'),
|
|
642
|
+
'calendarView.showWeatherOnTimeline': def('calendarView', 'boolean', false, 'TOGGLE'),
|
|
643
|
+
'calendarView.weatherLocation': def('calendarView', 'json', null, 'CUSTOM_WEATHER_LOCATION'),
|
|
550
644
|
// ═══════════════════════════════════════════════════════════════════════
|
|
551
645
|
// Event form field visibility (time-based)
|
|
552
646
|
// ═══════════════════════════════════════════════════════════════════════
|
|
553
|
-
'eventForm.recurrence': def('eventForm', 'boolean', true),
|
|
554
|
-
'eventForm.reminders': def('eventForm', 'boolean', true),
|
|
555
|
-
'eventForm.emailReminders': def('eventForm', 'boolean', false),
|
|
556
|
-
'eventForm.location': def('eventForm', 'boolean', true),
|
|
557
|
-
'eventForm.travelTime': def('eventForm', 'boolean', false),
|
|
558
|
-
'eventForm.description': def('eventForm', 'boolean', true),
|
|
559
|
-
'eventForm.checklist': def('eventForm', 'boolean', true),
|
|
560
|
-
'eventForm.images': def('eventForm', 'boolean', false),
|
|
561
|
-
'eventForm.audioClips': def('eventForm', 'boolean', false),
|
|
562
|
-
'eventForm.notificationReceivers': def('eventForm', 'boolean', true),
|
|
563
|
-
'eventForm.visibility': def('eventForm', 'boolean', false),
|
|
647
|
+
'eventForm.recurrence': def('eventForm', 'boolean', true, 'TOGGLE'),
|
|
648
|
+
'eventForm.reminders': def('eventForm', 'boolean', true, 'TOGGLE'),
|
|
649
|
+
'eventForm.emailReminders': def('eventForm', 'boolean', false, 'TOGGLE'),
|
|
650
|
+
'eventForm.location': def('eventForm', 'boolean', true, 'TOGGLE'),
|
|
651
|
+
'eventForm.travelTime': def('eventForm', 'boolean', false, 'TOGGLE'),
|
|
652
|
+
'eventForm.description': def('eventForm', 'boolean', true, 'TOGGLE'),
|
|
653
|
+
'eventForm.checklist': def('eventForm', 'boolean', true, 'TOGGLE'),
|
|
654
|
+
'eventForm.images': def('eventForm', 'boolean', false, 'TOGGLE'),
|
|
655
|
+
'eventForm.audioClips': def('eventForm', 'boolean', false, 'TOGGLE'),
|
|
656
|
+
'eventForm.notificationReceivers': def('eventForm', 'boolean', true, 'TOGGLE'),
|
|
657
|
+
'eventForm.visibility': def('eventForm', 'boolean', false, 'TOGGLE'),
|
|
564
658
|
// ═══════════════════════════════════════════════════════════════════════
|
|
565
659
|
// Sound & alerts
|
|
566
660
|
// ═══════════════════════════════════════════════════════════════════════
|
|
567
|
-
'sound.timerVolume': def('sound', 'number', 0.5),
|
|
568
|
-
'sound.reminderVolume': def('sound', 'number', 0.5),
|
|
569
|
-
'sound.mediaVolume': def('sound', 'number', 0.5),
|
|
570
|
-
'sound.alarmSound': def('sound', 'string', 'alarm1'),
|
|
571
|
-
'sound.reminderAlarmSound': def('sound', 'string', 'alarm1'),
|
|
572
|
-
'sound.timerAlarmSound': def('sound', 'string', 'alarm1'),
|
|
573
|
-
'sound.timerAlarmTimeout': def('sound', 'number', 3),
|
|
574
|
-
'sound.reminderAlarmTimeout': def('sound', 'number', 3),
|
|
575
|
-
'sound.allowCustomReminderSounds': def('sound', 'boolean', false),
|
|
576
|
-
'sound.ttsEnabled': def('sound', 'boolean', config.isEnrolled),
|
|
577
|
-
'sound.ttsRate': def('sound', 'number', 1.0),
|
|
661
|
+
'sound.timerVolume': def('sound', 'number', 0.5, 'VOLUME_SLIDER'),
|
|
662
|
+
'sound.reminderVolume': def('sound', 'number', 0.5, 'VOLUME_SLIDER'),
|
|
663
|
+
'sound.mediaVolume': def('sound', 'number', 0.5, 'VOLUME_SLIDER'),
|
|
664
|
+
'sound.alarmSound': def('sound', 'string', 'alarm1', 'SELECT', { options: ALARM_SOUND_OPTIONS }),
|
|
665
|
+
'sound.reminderAlarmSound': def('sound', 'string', 'alarm1', 'SELECT', { options: ALARM_SOUND_OPTIONS }),
|
|
666
|
+
'sound.timerAlarmSound': def('sound', 'string', 'alarm1', 'SELECT', { options: ALARM_SOUND_OPTIONS }),
|
|
667
|
+
'sound.timerAlarmTimeout': def('sound', 'number', 3, 'SELECT', { options: ALARM_TIMEOUT_OPTIONS }),
|
|
668
|
+
'sound.reminderAlarmTimeout': def('sound', 'number', 3, 'SELECT', { options: ALARM_TIMEOUT_OPTIONS }),
|
|
669
|
+
'sound.allowCustomReminderSounds': def('sound', 'boolean', false, 'TOGGLE'),
|
|
670
|
+
'sound.ttsEnabled': def('sound', 'boolean', config.isEnrolled, 'TOGGLE'),
|
|
671
|
+
'sound.ttsRate': def('sound', 'number', 1.0, 'SLIDER', { sliderConfig: { min: 0.5, max: 2, step: 0.1 } }),
|
|
578
672
|
// ═══════════════════════════════════════════════════════════════════════
|
|
579
673
|
// Timer
|
|
580
674
|
// ═══════════════════════════════════════════════════════════════════════
|
|
581
|
-
'timer.showTimeRemaining': def('timer', 'boolean', true),
|
|
582
|
-
'timer.showEndTime': def('timer', 'boolean', true),
|
|
583
|
-
'timer.showRestartButton': def('timer', 'boolean', true),
|
|
584
|
-
'timer.showPauseButton': def('timer', 'boolean', true),
|
|
675
|
+
'timer.showTimeRemaining': def('timer', 'boolean', true, 'TOGGLE'),
|
|
676
|
+
'timer.showEndTime': def('timer', 'boolean', true, 'TOGGLE'),
|
|
677
|
+
'timer.showRestartButton': def('timer', 'boolean', true, 'TOGGLE'),
|
|
678
|
+
'timer.showPauseButton': def('timer', 'boolean', true, 'TOGGLE'),
|
|
585
679
|
// ═══════════════════════════════════════════════════════════════════════
|
|
586
680
|
// Lock screen
|
|
587
681
|
// ═══════════════════════════════════════════════════════════════════════
|
|
588
|
-
'lockScreen.pin': def('lockScreen', 'string', ''),
|
|
589
|
-
'lockScreen.inactivityLockEnabled': def('lockScreen', 'boolean', false),
|
|
590
|
-
'lockScreen.inactivityTimeoutMinutes': def('lockScreen', 'number', 5
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
682
|
+
'lockScreen.pin': def('lockScreen', 'string', '', 'PIN_INPUT'),
|
|
683
|
+
'lockScreen.inactivityLockEnabled': def('lockScreen', 'boolean', false, 'TOGGLE'),
|
|
684
|
+
'lockScreen.inactivityTimeoutMinutes': def('lockScreen', 'number', 5, 'SELECT', {
|
|
685
|
+
options: [
|
|
686
|
+
{ value: 1, labelKey: 'Settings.Option.InactivityTimeout.1min' },
|
|
687
|
+
{ value: 5, labelKey: 'Settings.Option.InactivityTimeout.5min' },
|
|
688
|
+
{ value: 10, labelKey: 'Settings.Option.InactivityTimeout.10min' },
|
|
689
|
+
{ value: 15, labelKey: 'Settings.Option.InactivityTimeout.15min' },
|
|
690
|
+
{ value: 30, labelKey: 'Settings.Option.InactivityTimeout.30min' },
|
|
691
|
+
{ value: 45, labelKey: 'Settings.Option.InactivityTimeout.45min' },
|
|
692
|
+
],
|
|
693
|
+
}),
|
|
694
|
+
'lockScreen.clockDisplay': def('lockScreen', 'string', 'digital', 'SELECT', {
|
|
695
|
+
options: [
|
|
696
|
+
{ value: 'none', labelKey: 'Settings.Option.ClockDisplay.None' },
|
|
697
|
+
{
|
|
698
|
+
value: 'digital',
|
|
699
|
+
labelKey: 'Settings.Option.ClockDisplay.Digital',
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
value: 'analog',
|
|
703
|
+
labelKey: 'Settings.Option.ClockDisplay.Analog',
|
|
704
|
+
},
|
|
705
|
+
],
|
|
706
|
+
}),
|
|
707
|
+
'lockScreen.showDate': def('lockScreen', 'boolean', true, 'TOGGLE'),
|
|
708
|
+
'lockScreen.showHourNumbers': def('lockScreen', 'boolean', true, 'TOGGLE'),
|
|
709
|
+
'lockScreen.imageMode': def('lockScreen', 'string', 'none', 'SELECT', {
|
|
710
|
+
options: [
|
|
711
|
+
{ value: 'none', labelKey: 'Settings.Option.ImageMode.None' },
|
|
712
|
+
{
|
|
713
|
+
value: 'background',
|
|
714
|
+
labelKey: 'Settings.Option.ImageMode.Background',
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
value: 'photoFrame',
|
|
718
|
+
labelKey: 'Settings.Option.ImageMode.PhotoFrame',
|
|
719
|
+
},
|
|
720
|
+
],
|
|
721
|
+
}),
|
|
722
|
+
'lockScreen.backgroundImage': def('lockScreen', 'json', null, 'CUSTOM_IMAGE'),
|
|
723
|
+
'lockScreen.photoFrameImages': def('lockScreen', 'json', [], 'CUSTOM_IMAGE_ARRAY'),
|
|
724
|
+
'lockScreen.photoFrameIntervalSeconds': def('lockScreen', 'number', 60, 'SELECT', {
|
|
725
|
+
options: [
|
|
726
|
+
{ value: 30, labelKey: 'Settings.Option.PhotoFrameInterval.30sec' },
|
|
727
|
+
{ value: 60, labelKey: 'Settings.Option.PhotoFrameInterval.1min' },
|
|
728
|
+
{ value: 120, labelKey: 'Settings.Option.PhotoFrameInterval.2min' },
|
|
729
|
+
{ value: 300, labelKey: 'Settings.Option.PhotoFrameInterval.5min' },
|
|
730
|
+
],
|
|
731
|
+
}),
|
|
598
732
|
// ═══════════════════════════════════════════════════════════════════════
|
|
599
733
|
// Touch / gestures
|
|
600
734
|
// ═══════════════════════════════════════════════════════════════════════
|
|
601
|
-
'touch.enableTapToCreate': def('touch', 'boolean', false),
|
|
602
|
-
'touch.enableDragDrop': def('touch', 'boolean', false),
|
|
735
|
+
'touch.enableTapToCreate': def('touch', 'boolean', false, 'TOGGLE'),
|
|
736
|
+
'touch.enableDragDrop': def('touch', 'boolean', false, 'TOGGLE'),
|
|
603
737
|
// ═══════════════════════════════════════════════════════════════════════
|
|
604
738
|
// Device (not synced unless noted)
|
|
605
739
|
// ═══════════════════════════════════════════════════════════════════════
|
|
606
|
-
'device.id': def('device', 'string', '', false),
|
|
607
|
-
'device.timePickerMode': def('device', 'string', 'dials'
|
|
608
|
-
|
|
609
|
-
|
|
740
|
+
'device.id': def('device', 'string', '', 'HIDDEN', { sync: false }),
|
|
741
|
+
'device.timePickerMode': def('device', 'string', 'dials', 'SELECT', {
|
|
742
|
+
options: [
|
|
743
|
+
{ value: 'dials', labelKey: 'Settings.Option.TimePickerMode.Dials' },
|
|
744
|
+
{
|
|
745
|
+
value: 'keypad',
|
|
746
|
+
labelKey: 'Settings.Option.TimePickerMode.Keypad',
|
|
747
|
+
},
|
|
748
|
+
],
|
|
749
|
+
}),
|
|
750
|
+
'device.devMenuEnabled': def('device', 'boolean', false, 'HIDDEN', { sync: false }),
|
|
751
|
+
'device.authWarningDismissTtlDays': def('device', 'number', 3, 'HIDDEN', { sync: false }),
|
|
610
752
|
// ═══════════════════════════════════════════════════════════════════════
|
|
611
753
|
// Language
|
|
612
754
|
// ═══════════════════════════════════════════════════════════════════════
|
|
613
|
-
'language.locale': def('language', 'string', config.defaultLocale
|
|
755
|
+
'language.locale': def('language', 'string', config.defaultLocale, 'CUSTOM_LANGUAGE_PICKER', {
|
|
756
|
+
options: [
|
|
757
|
+
{ value: 'nb', labelKey: 'Settings.Option.Language.Norwegian' },
|
|
758
|
+
{ value: 'en', labelKey: 'Settings.Option.Language.English' },
|
|
759
|
+
],
|
|
760
|
+
}),
|
|
614
761
|
// ═══════════════════════════════════════════════════════════════════════
|
|
615
762
|
// Notifications
|
|
616
763
|
// ═══════════════════════════════════════════════════════════════════════
|
|
617
|
-
'notification.enabled': def('notification', 'boolean', false),
|
|
618
|
-
'notification.notifyAllCalendars': def('notification', 'boolean', true),
|
|
619
|
-
'notification.enabledCalendarIds': def('notification', 'json', []),
|
|
620
|
-
'notification.hasBeenPrompted': def('notification', 'boolean', false, false),
|
|
764
|
+
'notification.enabled': def('notification', 'boolean', false, 'TOGGLE'),
|
|
765
|
+
'notification.notifyAllCalendars': def('notification', 'boolean', true, 'TOGGLE'),
|
|
766
|
+
'notification.enabledCalendarIds': def('notification', 'json', [], 'CUSTOM_CALENDAR_IDS'),
|
|
767
|
+
'notification.hasBeenPrompted': def('notification', 'boolean', false, 'HIDDEN', { sync: false }),
|
|
621
768
|
// ═══════════════════════════════════════════════════════════════════════
|
|
622
769
|
// Chronological features (header, footer, menu, quick settings, timer)
|
|
623
770
|
// ═══════════════════════════════════════════════════════════════════════
|
|
624
771
|
// Header
|
|
625
|
-
'chronological.header.showNavigationArrows': def('chronological', 'boolean', true),
|
|
626
|
-
'chronological.header.showClock': def('chronological', 'boolean', true),
|
|
627
|
-
'chronological.header.showCurrentYearInDate': def('chronological', 'boolean', false),
|
|
628
|
-
'chronological.header.showTimeOfDay': def('chronological', 'boolean', false),
|
|
772
|
+
'chronological.header.showNavigationArrows': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
773
|
+
'chronological.header.showClock': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
774
|
+
'chronological.header.showCurrentYearInDate': def('chronological', 'boolean', false, 'TOGGLE'),
|
|
775
|
+
'chronological.header.showTimeOfDay': def('chronological', 'boolean', false, 'TOGGLE'),
|
|
629
776
|
// Footer
|
|
630
|
-
'chronological.footer.showMenuButton': def('chronological', 'boolean', true),
|
|
631
|
-
'chronological.footer.showViewSwitcherDay': def('chronological', 'boolean', true),
|
|
632
|
-
'chronological.footer.showViewSwitcherWeek': def('chronological', 'boolean', true),
|
|
633
|
-
'chronological.footer.showViewSwitcherMonth': def('chronological', 'boolean', true),
|
|
634
|
-
'chronological.footer.showTimerButton': def('chronological', 'boolean', true),
|
|
635
|
-
'chronological.footer.showNewEventButton': def('chronological', 'boolean', true),
|
|
636
|
-
'chronological.footer.showSettingsButton': def('chronological', 'boolean', true),
|
|
777
|
+
'chronological.footer.showMenuButton': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
778
|
+
'chronological.footer.showViewSwitcherDay': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
779
|
+
'chronological.footer.showViewSwitcherWeek': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
780
|
+
'chronological.footer.showViewSwitcherMonth': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
781
|
+
'chronological.footer.showTimerButton': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
782
|
+
'chronological.footer.showNewEventButton': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
783
|
+
'chronological.footer.showSettingsButton': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
637
784
|
// Timer features
|
|
638
|
-
'chronological.timer.showNewCountdown': def('chronological', 'boolean', true),
|
|
639
|
-
'chronological.timer.showFromTemplate': def('chronological', 'boolean', true),
|
|
640
|
-
'chronological.timer.showEditTemplate': def('chronological', 'boolean', true),
|
|
641
|
-
'chronological.timer.showDeleteTemplate': def('chronological', 'boolean', true),
|
|
642
|
-
'chronological.timer.showAddTemplate': def('chronological', 'boolean', true),
|
|
785
|
+
'chronological.timer.showNewCountdown': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
786
|
+
'chronological.timer.showFromTemplate': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
787
|
+
'chronological.timer.showEditTemplate': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
788
|
+
'chronological.timer.showDeleteTemplate': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
789
|
+
'chronological.timer.showAddTemplate': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
643
790
|
// Menu
|
|
644
|
-
'chronological.menu.showSettingsButton': def('chronological', 'boolean', true),
|
|
791
|
+
'chronological.menu.showSettingsButton': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
645
792
|
// Quick settings
|
|
646
|
-
'chronological.quickSettings.showTimerVolume': def('chronological', 'boolean', true),
|
|
647
|
-
'chronological.quickSettings.showReminderVolume': def('chronological', 'boolean', true),
|
|
648
|
-
'chronological.quickSettings.showMediaVolume': def('chronological', 'boolean', true),
|
|
649
|
-
'chronological.quickSettings.showBrightness': def('chronological', 'boolean', true),
|
|
650
|
-
'chronological.quickSettings.showLockScreen': def('chronological', 'boolean', true),
|
|
793
|
+
'chronological.quickSettings.showTimerVolume': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
794
|
+
'chronological.quickSettings.showReminderVolume': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
795
|
+
'chronological.quickSettings.showMediaVolume': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
796
|
+
'chronological.quickSettings.showBrightness': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
797
|
+
'chronological.quickSettings.showLockScreen': def('chronological', 'boolean', true, 'TOGGLE'),
|
|
651
798
|
// Time-of-day periods
|
|
652
|
-
'chronological.timeOfDay.morningStart': def('chronological', 'number', 6),
|
|
653
|
-
'chronological.timeOfDay.forenoonStart': def('chronological', 'number', 9),
|
|
654
|
-
'chronological.timeOfDay.afternoonStart': def('chronological', 'number', 12),
|
|
655
|
-
'chronological.timeOfDay.eveningStart': def('chronological', 'number', 18),
|
|
656
|
-
'chronological.timeOfDay.nightStart': def('chronological', 'number', 0),
|
|
799
|
+
'chronological.timeOfDay.morningStart': def('chronological', 'number', 6, 'SLIDER', { sliderConfig: TIME_OF_DAY_SLIDER }),
|
|
800
|
+
'chronological.timeOfDay.forenoonStart': def('chronological', 'number', 9, 'SLIDER', { sliderConfig: TIME_OF_DAY_SLIDER }),
|
|
801
|
+
'chronological.timeOfDay.afternoonStart': def('chronological', 'number', 12, 'SLIDER', { sliderConfig: TIME_OF_DAY_SLIDER }),
|
|
802
|
+
'chronological.timeOfDay.eveningStart': def('chronological', 'number', 18, 'SLIDER', { sliderConfig: TIME_OF_DAY_SLIDER }),
|
|
803
|
+
'chronological.timeOfDay.nightStart': def('chronological', 'number', 0, 'SLIDER', { sliderConfig: TIME_OF_DAY_SLIDER }),
|
|
657
804
|
// ═══════════════════════════════════════════════════════════════════════
|
|
658
805
|
// Chronological event form
|
|
659
806
|
// ═══════════════════════════════════════════════════════════════════════
|
|
660
807
|
// Toggleable fields
|
|
661
|
-
'chronologicalEventForm.field.description': def('chronologicalEventForm', 'boolean', true),
|
|
662
|
-
'chronologicalEventForm.field.recurrence': def('chronologicalEventForm', 'boolean', true),
|
|
663
|
-
'chronologicalEventForm.field.acknowledge': def('chronologicalEventForm', 'boolean', true),
|
|
664
|
-
'chronologicalEventForm.field.checklist': def('chronologicalEventForm', 'boolean', true),
|
|
665
|
-
'chronologicalEventForm.field.extraImages': def('chronologicalEventForm', 'boolean', true),
|
|
666
|
-
'chronologicalEventForm.field.reminders': def('chronologicalEventForm', 'boolean', true),
|
|
667
|
-
'chronologicalEventForm.field.audioClips': def('chronologicalEventForm', 'boolean', true),
|
|
808
|
+
'chronologicalEventForm.field.description': def('chronologicalEventForm', 'boolean', true, 'TOGGLE'),
|
|
809
|
+
'chronologicalEventForm.field.recurrence': def('chronologicalEventForm', 'boolean', true, 'TOGGLE'),
|
|
810
|
+
'chronologicalEventForm.field.acknowledge': def('chronologicalEventForm', 'boolean', true, 'TOGGLE'),
|
|
811
|
+
'chronologicalEventForm.field.checklist': def('chronologicalEventForm', 'boolean', true, 'TOGGLE'),
|
|
812
|
+
'chronologicalEventForm.field.extraImages': def('chronologicalEventForm', 'boolean', true, 'TOGGLE'),
|
|
813
|
+
'chronologicalEventForm.field.reminders': def('chronologicalEventForm', 'boolean', true, 'TOGGLE'),
|
|
814
|
+
'chronologicalEventForm.field.audioClips': def('chronologicalEventForm', 'boolean', true, 'TOGGLE'),
|
|
668
815
|
// Fixed fields
|
|
669
|
-
'chronologicalEventForm.fixedField.allDay': def('chronologicalEventForm', 'boolean', true),
|
|
670
|
-
'chronologicalEventForm.fixedField.endTime': def('chronologicalEventForm', 'boolean', true),
|
|
671
|
-
'chronologicalEventForm.fixedField.visibility': def('chronologicalEventForm', 'boolean', true),
|
|
816
|
+
'chronologicalEventForm.fixedField.allDay': def('chronologicalEventForm', 'boolean', true, 'TOGGLE'),
|
|
817
|
+
'chronologicalEventForm.fixedField.endTime': def('chronologicalEventForm', 'boolean', true, 'TOGGLE'),
|
|
818
|
+
'chronologicalEventForm.fixedField.visibility': def('chronologicalEventForm', 'boolean', true, 'TOGGLE'),
|
|
672
819
|
// Suggest end time
|
|
673
|
-
'chronologicalEventForm.suggestEndTime.enabled': def('chronologicalEventForm', 'boolean', false),
|
|
674
|
-
'chronologicalEventForm.suggestEndTime.value': def('chronologicalEventForm', 'number', 30),
|
|
675
|
-
'chronologicalEventForm.suggestEndTime.unit': def('chronologicalEventForm', 'string', 'minutes'
|
|
820
|
+
'chronologicalEventForm.suggestEndTime.enabled': def('chronologicalEventForm', 'boolean', false, 'TOGGLE'),
|
|
821
|
+
'chronologicalEventForm.suggestEndTime.value': def('chronologicalEventForm', 'number', 30, 'SLIDER', { sliderConfig: { min: 5, max: 480, step: 5 } }),
|
|
822
|
+
'chronologicalEventForm.suggestEndTime.unit': def('chronologicalEventForm', 'string', 'minutes', 'SELECT', {
|
|
823
|
+
options: [
|
|
824
|
+
{
|
|
825
|
+
value: 'minutes',
|
|
826
|
+
labelKey: 'Settings.Option.SuggestEndTimeUnit.Minutes',
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
value: 'hours',
|
|
830
|
+
labelKey: 'Settings.Option.SuggestEndTimeUnit.Hours',
|
|
831
|
+
},
|
|
832
|
+
],
|
|
833
|
+
}),
|
|
676
834
|
// Default visibility
|
|
677
|
-
'chronologicalEventForm.defaultVisibility': def('chronologicalEventForm', 'string', 'Private'
|
|
835
|
+
'chronologicalEventForm.defaultVisibility': def('chronologicalEventForm', 'string', 'Private', 'SELECT', {
|
|
836
|
+
options: [
|
|
837
|
+
{ value: 'Public', labelKey: 'Settings.Option.Visibility.Public' },
|
|
838
|
+
{ value: 'Private', labelKey: 'Settings.Option.Visibility.Private' },
|
|
839
|
+
{ value: 'Custom', labelKey: 'Settings.Option.Visibility.Custom' },
|
|
840
|
+
],
|
|
841
|
+
}),
|
|
678
842
|
// Reminder presets
|
|
679
|
-
'chronologicalEventForm.reminderPresets.timed': def('chronologicalEventForm', 'json', [5, 15, 30, 60, 120, 1440]),
|
|
843
|
+
'chronologicalEventForm.reminderPresets.timed': def('chronologicalEventForm', 'json', [5, 15, 30, 60, 120, 1440], 'CUSTOM_REMINDER_PRESETS'),
|
|
680
844
|
'chronologicalEventForm.reminderPresets.allDay': def('chronologicalEventForm', 'json', [
|
|
681
845
|
{ daysBefore: 0, time: '09:00' },
|
|
682
846
|
{ daysBefore: 1, time: '18:00' },
|
|
683
847
|
{ daysBefore: 2, time: '09:00' },
|
|
684
|
-
]),
|
|
848
|
+
], 'CUSTOM_REMINDER_PRESETS'),
|
|
685
849
|
};
|
|
686
850
|
}
|
|
687
851
|
// ---------------------------------------------------------------------------
|
|
@@ -825,6 +989,9 @@ export function parseSettingsSnapshot(json, calendarType, registry = defaultRegi
|
|
|
825
989
|
groups.set(category, []);
|
|
826
990
|
}
|
|
827
991
|
const labelDef = SETTINGS_LABELS[key];
|
|
992
|
+
const entryDef = key in registry.entries
|
|
993
|
+
? registry.entries[key]
|
|
994
|
+
: undefined;
|
|
828
995
|
groups.get(category).push({
|
|
829
996
|
key,
|
|
830
997
|
name,
|
|
@@ -832,6 +999,9 @@ export function parseSettingsSnapshot(json, calendarType, registry = defaultRegi
|
|
|
832
999
|
labelKey: labelDef?.labelKey,
|
|
833
1000
|
descriptionKey: labelDef?.descriptionKey,
|
|
834
1001
|
value,
|
|
1002
|
+
uiType: entryDef?.uiType ?? 'TEXT_INPUT',
|
|
1003
|
+
...(entryDef?.options && { options: entryDef.options }),
|
|
1004
|
+
...(entryDef?.sliderConfig && { sliderConfig: entryDef.sliderConfig }),
|
|
835
1005
|
});
|
|
836
1006
|
}
|
|
837
1007
|
// Determine which categories to show
|