mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 09:56:36 +01:00
persisting zoom setting in electron, fixes #112
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
|
||||
const sql = require('../../services/sql');
|
||||
const optionService = require('../../services/options');
|
||||
const log = require('../../services/log');
|
||||
|
||||
// options allowed to be updated directly in options dialog
|
||||
const ALLOWED_OPTIONS = ['protectedSessionTimeout', 'noteRevisionSnapshotTimeInterval'];
|
||||
const ALLOWED_OPTIONS = ['protectedSessionTimeout', 'noteRevisionSnapshotTimeInterval', 'zoomFactor'];
|
||||
|
||||
async function getOptions() {
|
||||
const options = await sql.getMap("SELECT name, value FROM options WHERE name IN ("
|
||||
@@ -20,6 +21,8 @@ async function updateOption(req) {
|
||||
return [400, "not allowed option to set"];
|
||||
}
|
||||
|
||||
log.info(`Updating option ${name} to ${value}`);
|
||||
|
||||
await optionService.setOption(name, value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user