diff --git a/src/services/options_init.ts b/src/services/options_init.ts index b07300150..111e78cd4 100644 --- a/src/services/options_init.ts +++ b/src/services/options_init.ts @@ -16,6 +16,12 @@ interface NotSyncedOpts { syncProxy?: string; } +interface DefaultOption { + name: string; + value: string; + isSynced: boolean; +} + async function initNotSyncedOptions(initialized: boolean, theme: string, opts: NotSyncedOpts = {}) { optionService.createOption('openNoteContexts', JSON.stringify([ { @@ -35,13 +41,13 @@ async function initNotSyncedOptions(initialized: boolean, theme: string, opts: N optionService.createOption('lastSyncedPush', '0', false); optionService.createOption('theme', theme, false); - + optionService.createOption('syncServerHost', opts.syncServerHost || '', false); optionService.createOption('syncServerTimeout', '120000', false); optionService.createOption('syncProxy', opts.syncProxy || '', false); } -const defaultOptions = [ +const defaultOptions: DefaultOption[] = [ { name: 'revisionSnapshotTimeInterval', value: '600', isSynced: true }, { name: 'protectedSessionTimeout', value: '600', isSynced: true }, { name: 'zoomFactor', value: process.platform === "win32" ? '0.9' : '1.0', isSynced: false }, @@ -88,7 +94,8 @@ const defaultOptions = [ { name: 'customSearchEngineName', value: 'DuckDuckGo', isSynced: true }, { name: 'customSearchEngineUrl', value: 'https://duckduckgo.com/?q={keyword}', isSynced: true }, { name: 'promotedAttributesOpenInRibbon', value: 'true', isSynced: true }, - { name: 'editedNotesOpenInRibbon', value: 'true', isSynced: true } + { name: 'editedNotesOpenInRibbon', value: 'true', isSynced: true }, + { name: 'locale', value: 'en', isSynced: true } ]; function initStartupOptions() {