add option to disable auto-download of images for offline storage, #2859

This commit is contained in:
zadam
2022-05-21 14:00:53 +02:00
parent 2085dc5ed4
commit 819cf0907d
4 changed files with 32 additions and 8 deletions

View File

@@ -29,13 +29,13 @@ function initNotSyncedOptions(initialized, opts = {}) {
optionService.createOption('lastSyncedPush', '0', false);
let theme = 'dark'; // default based on the poll in https://github.com/zadam/trilium/issues/2516
if (utils.isElectron()) {
const {nativeTheme} = require('electron');
theme = nativeTheme.shouldUseDarkColors ? 'dark' : 'light';
}
optionService.createOption('theme', theme, false);
optionService.createOption('syncServerHost', opts.syncServerHost || '', false);
@@ -83,7 +83,8 @@ const defaultOptions = [
{ name: 'weeklyBackupEnabled', value: 'true', isSynced: false },
{ name: 'monthlyBackupEnabled', value: 'true', isSynced: false },
{ name: 'maxContentWidth', value: '1200', isSynced: false },
{ name: 'compressImages', value: 'true', isSynced: true }
{ name: 'compressImages', value: 'true', isSynced: true },
{ name: 'downloadImagesAutomatically', value: 'true', isSynced: true }
];
function initStartupOptions() {