mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	fix(server): server not starting due to dependency on electron remote
This commit is contained in:
		| @@ -7,7 +7,6 @@ import log from "./log.js"; | |||||||
| import sqlInit from "./sql_init.js"; | import sqlInit from "./sql_init.js"; | ||||||
| import cls from "./cls.js"; | import cls from "./cls.js"; | ||||||
| import keyboardActionsService from "./keyboard_actions.js"; | import keyboardActionsService from "./keyboard_actions.js"; | ||||||
| import * as remoteMain from "@electron/remote/main/index.js"; |  | ||||||
| import electron from "electron"; | import electron from "electron"; | ||||||
| import type { App, BrowserWindowConstructorOptions, BrowserWindow, WebContents } from "electron"; | import type { App, BrowserWindowConstructorOptions, BrowserWindow, WebContents } from "electron"; | ||||||
| import { formatDownloadTitle, isDev, isMac, isWindows } from "./utils.js"; | import { formatDownloadTitle, isDev, isMac, isWindows } from "./utils.js"; | ||||||
| @@ -226,7 +225,8 @@ function getWindowExtraOpts() { | |||||||
|     return extraOpts; |     return extraOpts; | ||||||
| } | } | ||||||
|  |  | ||||||
| function configureWebContents(webContents: WebContents, spellcheckEnabled: boolean) { | async function configureWebContents(webContents: WebContents, spellcheckEnabled: boolean) { | ||||||
|  |     const remoteMain = (await import("@electron/remote/main/index.js")).default; | ||||||
|     remoteMain.enable(webContents); |     remoteMain.enable(webContents); | ||||||
|  |  | ||||||
|     webContents.setWindowOpenHandler((details) => { |     webContents.setWindowOpenHandler((details) => { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user