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