Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(server): set up option to toggle background effects
Elian Doranc39e8be29a37
diff --git a/src/routes/api/options.ts b/src/routes/api/options.tsindex 0e60bea279..214e265ef3 100644--- a/src/routes/api/options.ts+++ b/src/routes/api/options.ts@@ -68,6 +68,7 @@ const ALLOWED_OPTIONS = new Set(['firstDayOfWeek','textNoteEditorType','layoutOrientation',+ 'backgroundEffects','allowedHtmlTags' // Allow configuring HTML import tags]);diff --git a/src/routes/index.ts b/src/routes/index.tsindex 8dda180f6c..c5c29797c7 100644--- a/src/routes/index.ts+++ b/src/routes/index.ts@@ -37,7 +37,7 @@ function index(req: Request, res: Response) {platform: process.platform,isElectron,hasNativeTitleBar: (isElectron && options.nativeTitleBarVisible === "true"),- hasBackgroundEffects: (isElectron && true),+ hasBackgroundEffects: (isElectron && options.backgroundEffects === "true"),mainFontSize: parseInt(options.mainFontSize),treeFontSize: parseInt(options.treeFontSize),detailFontSize: parseInt(options.detailFontSize),diff --git a/src/services/options_init.ts b/src/services/options_init.tsindex 60cce21764..a0d08a8157 100644--- a/src/services/options_init.ts+++ b/src/services/options_init.ts@@ -137,6 +137,7 @@ const defaultOptions: DefaultOption[] = [// HTML import configuration{ name: "layoutOrientation", value: "vertical", isSynced: false },+ { name: "backgroundEffects", value: "false", isSynced: false },{ name: "allowedHtmlTags", value: JSON.stringify(['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul', 'ol','li', 'b', 'i', 'strong', 'em', 'strike', 's', 'del', 'abbr', 'code', 'hr', 'br', 'div',