server: Set up a locale option

This commit is contained in:
Elian Doran 2024-08-11 07:36:00 +03:00
parent 3a837cf663
commit 6871216649
No known key found for this signature in database

View File

@ -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() {