mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 03:46:37 +01:00
refactor(server/utils): isMac/isWin - replace fn with boolean
those values cannot change during runtime, => there is no need to have these checks as dynamic function, instead just export the boolean value directly
This commit is contained in:
@@ -116,10 +116,10 @@ function getWindowExtraOpts() {
|
||||
const extraOpts: Partial<BrowserWindowConstructorOptions> = {};
|
||||
|
||||
if (!optionService.getOptionBool("nativeTitleBarVisible")) {
|
||||
if (isMac()) {
|
||||
if (isMac) {
|
||||
extraOpts.titleBarStyle = "hiddenInset";
|
||||
extraOpts.titleBarOverlay = true;
|
||||
} else if (isWindows()) {
|
||||
} else if (isWindows) {
|
||||
extraOpts.titleBarStyle = "hidden";
|
||||
extraOpts.titleBarOverlay = true;
|
||||
} else {
|
||||
@@ -129,7 +129,7 @@ function getWindowExtraOpts() {
|
||||
}
|
||||
|
||||
// Window effects (Mica)
|
||||
if (optionService.getOptionBool("backgroundEffects") && isWindows()) {
|
||||
if (optionService.getOptionBool("backgroundEffects") && isWindows) {
|
||||
extraOpts.backgroundMaterial = "auto";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user