add dialog for unhandled errors

This commit is contained in:
2024-01-25 14:10:18 +01:00
parent b85a3a8795
commit 5b1407638a
3 changed files with 75 additions and 2 deletions

10
main.js
View File

@@ -2,6 +2,16 @@
const { app, BrowserWindow, Menu, ipcMain, dialog, shell } = require(
"electron",
);
const unhandled = require("electron-unhandled");
unhandled({
logger: console.error,
showDialog: true,
reportButton: () => {
shell.openExternal("https://ez-pp.farm/discord");
},
});
const path = require("path");
const serve = require("electron-serve");
const loadURL = serve({ directory: "public" });