options now allow selecting user theme

This commit is contained in:
zadam
2019-01-27 21:18:11 +01:00
parent 2c1580ea65
commit 67630b1a22
5 changed files with 42 additions and 8 deletions

View File

@@ -1,8 +1,8 @@
"use strict";
const sql = require('../../services/sql');
const optionService = require('../../services/options');
const log = require('../../services/log');
const attributes = require('../../services/attributes');
// options allowed to be updated directly in options dialog
const ALLOWED_OPTIONS = ['protectedSessionTimeout', 'noteRevisionSnapshotTimeInterval',
@@ -42,8 +42,20 @@ async function update(name, value) {
return true;
}
async function getUserThemes() {
return (await attributes.getNotesWithLabel('appTheme'))
.map(note => {
return {
val: note.title,
title: note.title,
noteId: note.noteId
};
});
}
module.exports = {
getOptions,
updateOption,
updateOptions
updateOptions,
getUserThemes
};