mirror of
https://github.com/sascha-hemi/homeassistant-desktop.git
synced 2026-03-21 04:06:06 +01:00
feat: Added restart button on error page
This commit is contained in:
5
app.js
5
app.js
@@ -764,3 +764,8 @@ ipcMain.on('ha-instance', (event, url) => {
|
|||||||
ipcMain.on('reconnect', () => {
|
ipcMain.on('reconnect', () => {
|
||||||
reinitMainWindow();
|
reinitMainWindow();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ipcMain.on('restart', () => {
|
||||||
|
app.relaunch();
|
||||||
|
app.exit();
|
||||||
|
});
|
||||||
|
|||||||
@@ -12,6 +12,10 @@
|
|||||||
function reconnect() {
|
function reconnect() {
|
||||||
ipcRenderer.send('reconnect');
|
ipcRenderer.send('reconnect');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function restart() {
|
||||||
|
ipcRenderer.send('restart');
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@@ -34,6 +38,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<button class="pure-material-button-contained" onclick="reconnect()">Reconnect</button>
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user