new env variable to specify start note, #1532

This commit is contained in:
zadam 2021-01-11 22:29:02 +01:00
parent 04e6431c09
commit 369274ead7

View File

@ -31,10 +31,7 @@ function initNotSyncedOptions(initialized, startNotePath = 'root', opts = {}) {
optionService.createOption('openTabs', JSON.stringify([
{
notePath: startNotePath,
active: true,
sidebar: {
widgets: []
}
active: true
}
]), false);
@ -103,6 +100,15 @@ function initStartupOptions() {
log.info(`Created missing option "${name}" with default value "${value}"`);
}
}
if (process.env.TRILIUM_START_NOTE_ID) {
optionService.setOption('openTabs', JSON.stringify([
{
notePath: process.env.TRILIUM_START_NOTE_ID,
active: true
}
]));
}
}
function getKeyboardDefaultOptions() {