|
|
|
@ -31,7 +31,20 @@ async function main() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
electron.app.on("ready", async () => {
|
|
|
|
electron.app.on("ready", onReady);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
electron.app.on("will-quit", () => {
|
|
|
|
|
|
|
|
electron.globalShortcut.unregisterAll();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this is to disable electron warning spam in the dev console (local development only)
|
|
|
|
|
|
|
|
process.env["ELECTRON_DISABLE_SECURITY_WARNINGS"] = "true";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await initializeTranslations();
|
|
|
|
|
|
|
|
await import("@triliumnext/server/src/main.js");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export async function onReady() {
|
|
|
|
// electron.app.setAppUserModelId('com.github.zadam.trilium');
|
|
|
|
// electron.app.setAppUserModelId('com.github.zadam.trilium');
|
|
|
|
|
|
|
|
|
|
|
|
// if db is not initialized -> setup process
|
|
|
|
// if db is not initialized -> setup process
|
|
|
|
@ -55,17 +68,6 @@ async function main() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
await windowService.registerGlobalShortcuts();
|
|
|
|
await windowService.registerGlobalShortcuts();
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
electron.app.on("will-quit", () => {
|
|
|
|
|
|
|
|
electron.globalShortcut.unregisterAll();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this is to disable electron warning spam in the dev console (local development only)
|
|
|
|
|
|
|
|
process.env["ELECTRON_DISABLE_SECURITY_WARNINGS"] = "true";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await initializeTranslations();
|
|
|
|
|
|
|
|
await import("@triliumnext/server/src/main.js");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
main();
|
|
|
|
main();
|
|
|
|
|