添加重启应用功能,支持通过触摸事件触发重启
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user