feat: add error handling screen and logging functionality

This commit is contained in:
2026-06-04 14:09:27 +02:00
parent 6952a9954f
commit 982c771e82
16 changed files with 250 additions and 98 deletions
+8 -1
View File
@@ -1,4 +1,5 @@
import { BrowserWindow, BrowserWindowConstructorOptions, shell } from "electron";
import electronLog from "electron-log";
import { AppRuntimeConfig } from "../config/runtime-config";
import { DEFAULT_WINDOW_BACKGROUND, DEFAULT_WINDOW_SIZE, LOADING_WINDOW_SIZE } from "../constants";
@@ -33,6 +34,12 @@ export function createMainWindow({
});
window.webContents.on("will-navigate", (event, url) => {
if (url.startsWith("app://open-logs")) {
event.preventDefault();
void shell.showItemInFolder(electronLog.transports.file.getFile().path);
return;
}
if (shouldAllowInternalNavigation(url, mainDashboardUrl)) {
return;
}
@@ -67,7 +74,7 @@ export function createLoadingWindow({
return window;
}
export function createWindowOptions({
function createWindowOptions({
allowDevTools,
appConfig,
rootPath,