File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import attributeService from "../services/attributes.js";
5
5
import config from "../services/config.js" ;
6
6
import optionService from "../services/options.js" ;
7
7
import log from "../services/log.js" ;
8
- import { isDev , isElectron , isWindows } from "../services/utils.js" ;
8
+ import { isDev , isElectron , isWindows11 } from "../services/utils.js" ;
9
9
import protectedSessionService from "../services/protected_session.js" ;
10
10
import packageJson from "../../package.json" with { type : "json" } ;
11
11
import assetPath from "../services/asset_path.js" ;
@@ -42,7 +42,7 @@ function index(req: Request, res: Response) {
42
42
platform : process . platform ,
43
43
isElectron,
44
44
hasNativeTitleBar : isElectron && options . nativeTitleBarVisible === "true" ,
45
- hasBackgroundEffects : isWindows && isElectron && options . backgroundEffects === "true" ,
45
+ hasBackgroundEffects : isElectron && isWindows11 && options . backgroundEffects === "true" ,
46
46
mainFontSize : parseInt ( options . mainFontSize ) ,
47
47
treeFontSize : parseInt ( options . treeFontSize ) ,
48
48
detailFontSize : parseInt ( options . detailFontSize ) ,
Original file line number Diff line number Diff line change @@ -12,13 +12,18 @@ import path from "path";
12
12
import type NoteMeta from "./meta/note_meta.js" ;
13
13
import log from "./log.js" ;
14
14
import { t } from "i18next" ;
15
+ import { release as osRelease } from "os" ;
16
+
17
+ const osVersion = osRelease ( ) . split ( '.' ) . map ( Number ) ;
15
18
16
19
const randtoken = generator ( { source : "crypto" } ) ;
17
20
18
21
export const isMac = process . platform === "darwin" ;
19
22
20
23
export const isWindows = process . platform === "win32" ;
21
24
25
+ export const isWindows11 = isWindows && osVersion [ 0 ] === 10 && osVersion [ 2 ] >= 22000 ;
26
+
22
27
export const isElectron = ! ! process . versions [ "electron" ] ;
23
28
24
29
export const isDev = ! ! ( process . env . TRILIUM_ENV && process . env . TRILIUM_ENV === "dev" ) ;
You can’t perform that action at this time.
0 commit comments