mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 20:06:08 +01:00
refactor(server/utils): isDev move to utils and replace fn with boolean
this value 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:
@@ -2,7 +2,6 @@ import path from "path";
|
||||
import url from "url";
|
||||
import port from "./port.js";
|
||||
import optionService from "./options.js";
|
||||
import env from "./env.js";
|
||||
import log from "./log.js";
|
||||
import sqlInit from "./sql_init.js";
|
||||
import cls from "./cls.js";
|
||||
@@ -10,7 +9,7 @@ import keyboardActionsService from "./keyboard_actions.js";
|
||||
import remoteMain from "@electron/remote/main/index.js";
|
||||
import type { App, BrowserWindow, BrowserWindowConstructorOptions, WebContents } from "electron";
|
||||
import { ipcMain } from "electron";
|
||||
import { isMac, isWindows } from "./utils.js";
|
||||
import { isDev, isMac, isWindows } from "./utils.js";
|
||||
|
||||
import { fileURLToPath } from "url";
|
||||
import { dirname } from "path";
|
||||
@@ -169,7 +168,7 @@ function configureWebContents(webContents: WebContents, spellcheckEnabled: boole
|
||||
}
|
||||
|
||||
function getIcon() {
|
||||
return path.join(dirname(fileURLToPath(import.meta.url)), "../../images/app-icons/png/256x256" + (env.isDev() ? "-dev" : "") + ".png");
|
||||
return path.join(dirname(fileURLToPath(import.meta.url)), "../../images/app-icons/png/256x256" + (isDev ? "-dev" : "") + ".png");
|
||||
}
|
||||
|
||||
async function createSetupWindow() {
|
||||
|
||||
Reference in New Issue
Block a user