feat(desktop): improve integration of setup

This commit is contained in:
Elian Doran
2026-03-25 23:08:10 +02:00
parent 2eef2f801f
commit fa7d1d3f80
4 changed files with 21 additions and 14 deletions

View File

@@ -30,7 +30,7 @@ export function bootstrap(req: Request, res: Response) {
if (!isDbInitialized) {
res.send({
...commonItems,
baseApiUrl: "../api/"
baseApiUrl: "api/"
});
return;
}

View File

@@ -390,16 +390,18 @@ async function createSetupWindow() {
setupWindow = new BrowserWindow({
width,
height,
useContentSize: true,
resizable: false,
autoHideMenuBar: true,
title: "Trilium Notes Setup",
icon: getIcon(),
webPreferences: {
// necessary for e.g. utils.isElectron()
nodeIntegration: true
nodeIntegration: true,
contextIsolation: false
}
});
setupWindow.setMenuBarVisibility(false);
setupWindow.removeMenu();
setupWindow.loadURL(`http://127.0.0.1:${port}`);
setupWindow.on("closed", () => (setupWindow = null));
}