allow user to choose theme during initial setup

This commit is contained in:
zadam
2019-08-11 10:28:49 +02:00
parent de4733e848
commit 963ed32ce4
9 changed files with 73 additions and 34 deletions

View File

@@ -28,7 +28,7 @@ async function initSyncedOptions(username, password) {
await passwordEncryptionService.setDataKey(password, utils.randomSecureToken(16), true);
}
async function initNotSyncedOptions(initialized, startNotePath = 'root', syncServerHost = '', syncProxy = '') {
async function initNotSyncedOptions(initialized, startNotePath = 'root', opts = {}) {
await optionService.createOption('openTabs', JSON.stringify([
{
notePath: startNotePath,
@@ -45,14 +45,14 @@ async function initNotSyncedOptions(initialized, startNotePath = 'root', syncSer
await optionService.createOption('lastSyncedPush', 0, false);
await optionService.createOption('zoomFactor', 1.0, false);
await optionService.createOption('theme', 'white', false);
await optionService.createOption('theme', opts.theme || 'white', false);
await optionService.createOption('leftPaneMinWidth', '350', false);
await optionService.createOption('leftPaneWidthPercent', '20', false);
await optionService.createOption('syncServerHost', syncServerHost, false);
await optionService.createOption('syncServerHost', opts.syncServerHost || '', false);
await optionService.createOption('syncServerTimeout', 5000, false);
await optionService.createOption('syncProxy', syncProxy, false);
await optionService.createOption('syncProxy', opts.syncProxy || '', false);
await optionService.createOption('mainFontSize', '100', false);
await optionService.createOption('treeFontSize', '100', false);