feat(server): set up option to toggle background effects

This commit is contained in:
Elian Doran 2024-12-09 21:57:54 +02:00
parent f4efefe480
commit c39e8be29a
No known key found for this signature in database
3 changed files with 3 additions and 1 deletions

View File

@ -68,6 +68,7 @@ const ALLOWED_OPTIONS = new Set([
'firstDayOfWeek',
'textNoteEditorType',
'layoutOrientation',
'backgroundEffects',
'allowedHtmlTags' // Allow configuring HTML import tags
]);

View File

@ -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),

View File

@ -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',