mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 01:36:24 +01:00
options now allow selecting user theme
This commit is contained in:
@@ -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
|
||||
};
|
||||
Reference in New Issue
Block a user