mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	fix(desktop): background effects causing issues on Win10
This commit is contained in:
		@@ -5,7 +5,7 @@ import attributeService from "../services/attributes.js";
 | 
				
			|||||||
import config from "../services/config.js";
 | 
					import config from "../services/config.js";
 | 
				
			||||||
import optionService from "../services/options.js";
 | 
					import optionService from "../services/options.js";
 | 
				
			||||||
import log from "../services/log.js";
 | 
					import log from "../services/log.js";
 | 
				
			||||||
import { isDev, isElectron, isWindows } from "../services/utils.js";
 | 
					import { isDev, isElectron, isWindows11 } from "../services/utils.js";
 | 
				
			||||||
import protectedSessionService from "../services/protected_session.js";
 | 
					import protectedSessionService from "../services/protected_session.js";
 | 
				
			||||||
import packageJson from "../../package.json" with { type: "json" };
 | 
					import packageJson from "../../package.json" with { type: "json" };
 | 
				
			||||||
import assetPath from "../services/asset_path.js";
 | 
					import assetPath from "../services/asset_path.js";
 | 
				
			||||||
@@ -42,7 +42,7 @@ function index(req: Request, res: Response) {
 | 
				
			|||||||
        platform: process.platform,
 | 
					        platform: process.platform,
 | 
				
			||||||
        isElectron,
 | 
					        isElectron,
 | 
				
			||||||
        hasNativeTitleBar: isElectron && options.nativeTitleBarVisible === "true",
 | 
					        hasNativeTitleBar: isElectron && options.nativeTitleBarVisible === "true",
 | 
				
			||||||
        hasBackgroundEffects: isWindows && isElectron && options.backgroundEffects === "true",
 | 
					        hasBackgroundEffects: isElectron && isWindows11 && options.backgroundEffects === "true",
 | 
				
			||||||
        mainFontSize: parseInt(options.mainFontSize),
 | 
					        mainFontSize: parseInt(options.mainFontSize),
 | 
				
			||||||
        treeFontSize: parseInt(options.treeFontSize),
 | 
					        treeFontSize: parseInt(options.treeFontSize),
 | 
				
			||||||
        detailFontSize: parseInt(options.detailFontSize),
 | 
					        detailFontSize: parseInt(options.detailFontSize),
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,6 +12,9 @@ import path from "path";
 | 
				
			|||||||
import type NoteMeta from "./meta/note_meta.js";
 | 
					import type NoteMeta from "./meta/note_meta.js";
 | 
				
			||||||
import log from "./log.js";
 | 
					import log from "./log.js";
 | 
				
			||||||
import { t } from "i18next";
 | 
					import { t } from "i18next";
 | 
				
			||||||
 | 
					import { release as osRelease } from "os";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const osVersion = osRelease().split('.').map(Number);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const randtoken = generator({ source: "crypto" });
 | 
					const randtoken = generator({ source: "crypto" });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -19,6 +22,8 @@ export const isMac = process.platform === "darwin";
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
export const isWindows = process.platform === "win32";
 | 
					export const isWindows = process.platform === "win32";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export const isWindows11 = isWindows && osVersion[0] === 10 && osVersion[2] >= 22000;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const isElectron = !!process.versions["electron"];
 | 
					export const isElectron = !!process.versions["electron"];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const isDev = !!(process.env.TRILIUM_ENV && process.env.TRILIUM_ENV === "dev");
 | 
					export const isDev = !!(process.env.TRILIUM_ENV && process.env.TRILIUM_ENV === "dev");
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user