#98, new option "initialized" which indicates if setup has been finished

This commit is contained in:
azivner
2018-07-24 08:12:36 +02:00
parent 1fe7c62f5a
commit 013714cb5c
11 changed files with 130 additions and 57 deletions

View File

@@ -29,7 +29,7 @@ async function initSyncedOptions(username, password) {
await passwordEncryptionService.setDataKey(password, utils.randomSecureToken(16));
}
async function initNotSyncedOptions(startNotePath = '', syncServerHost = '') {
async function initNotSyncedOptions(initialized, startNotePath = '', syncServerHost = '') {
await optionService.createOption('startNotePath', startNotePath, false);
await optionService.createOption('lastBackupDate', dateUtils.nowDate(), false);
await optionService.createOption('dbVersion', appInfo.dbVersion, false);
@@ -43,6 +43,8 @@ async function initNotSyncedOptions(startNotePath = '', syncServerHost = '') {
await optionService.createOption('syncServerHost', syncServerHost, false);
await optionService.createOption('syncServerTimeout', 5000, false);
await optionService.createOption('syncProxy', '', false);
await optionService.createOption('initialized', initialized ? 'true' : 'false', false);
}
module.exports = {