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

@@ -79,7 +79,7 @@ async function initDbConnection() {
});
}
async function createInitialDatabase(username, password) {
async function createInitialDatabase(username, password, theme) {
log.info("Creating initial database ...");
if (await isDbInitialized()) {
@@ -123,7 +123,7 @@ async function createInitialDatabase(username, password) {
await optionsInitService.initDocumentOptions();
await optionsInitService.initSyncedOptions(username, password);
await optionsInitService.initNotSyncedOptions(true, startNoteId);
await optionsInitService.initNotSyncedOptions(true, startNoteId, { theme });
await require('./sync_table').fillAllSyncRows();
});
@@ -145,7 +145,7 @@ async function createDatabaseForSync(options, syncServerHost = '', syncProxy = '
await sql.transactional(async () => {
await sql.executeScript(schema);
await require('./options_init').initNotSyncedOptions(false, 'root', syncServerHost, syncProxy);
await require('./options_init').initNotSyncedOptions(false, 'root', { syncServerHost, syncProxy });
// document options required for sync to kick off
for (const opt of options) {