feat: Added restart button on error page

This commit is contained in:
Ivan Prodanov
2022-11-14 22:48:22 +02:00
parent 60b2e561b0
commit 74ca227b4a
2 changed files with 10 additions and 0 deletions

5
app.js
View File

@@ -764,3 +764,8 @@ ipcMain.on('ha-instance', (event, url) => {
ipcMain.on('reconnect', () => {
reinitMainWindow();
});
ipcMain.on('restart', () => {
app.relaunch();
app.exit();
});

View File

@@ -12,6 +12,10 @@
function reconnect() {
ipcRenderer.send('reconnect');
}
function restart() {
ipcRenderer.send('restart');
}
</script>
</head>
@@ -34,6 +38,7 @@
</div>
<div class="center">
<button class="pure-material-button-contained" onclick="reconnect()">Reconnect</button>
<button class="pure-material-button-contained" onclick="restart()" style="margin-left: 10px">Restart</button>
</div>
</div>
</div>