添加重启应用功能,支持通过触摸事件触发重启

This commit is contained in:
yuchenglong
2025-12-04 13:50:20 +08:00
parent 1e0822c1a0
commit 34e9c58392
4 changed files with 34 additions and 3 deletions

View File

@@ -368,6 +368,11 @@ app.whenReady().then(() => {
return "stopped";
});
ipcMain.on("restart-app", () => {
app.relaunch();
app.exit(0);
});
app.on("activate", () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();