diff --git a/app.js b/app.js index 2fbab66..e277bc2 100644 --- a/app.js +++ b/app.js @@ -764,3 +764,8 @@ ipcMain.on('ha-instance', (event, url) => { ipcMain.on('reconnect', () => { reinitMainWindow(); }); + +ipcMain.on('restart', () => { + app.relaunch(); + app.exit(); +}); diff --git a/web/error.html b/web/error.html index 7cb45a5..22d59bf 100644 --- a/web/error.html +++ b/web/error.html @@ -12,6 +12,10 @@ function reconnect() { ipcRenderer.send('reconnect'); } + + function restart() { + ipcRenderer.send('restart'); + } @@ -34,6 +38,7 @@