mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 11:02:28 +08:00
fix(server): server not starting due to dependency on electron remote
This commit is contained in:
parent
45c946352e
commit
b59af770c2
@ -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) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user