mirror of
https://github.com/sascha-hemi/homeassistant-desktop.git
synced 2026-03-21 00:04:12 +01:00
added force quit for instant updating
This commit is contained in:
5
app.js
5
app.js
@@ -4,8 +4,6 @@ const AutoLaunch = require('auto-launch');
|
||||
const Positioner = require('electron-traywindow-positioner');
|
||||
const Store = require('electron-store');
|
||||
|
||||
const indexFile = `file://${__dirname}/web/index.html`;
|
||||
|
||||
app.allowRendererProcessReuse = true;
|
||||
|
||||
// prevent multiple instances
|
||||
@@ -23,9 +21,11 @@ if (process.platform === 'darwin') app.dock.hide();
|
||||
const store = new Store();
|
||||
const autoLauncher = new AutoLaunch({name: 'Home Assistant Desktop'});
|
||||
|
||||
const indexFile = `file://${__dirname}/web/index.html`;
|
||||
let autostartEnabled = false;
|
||||
let forceQuit = false;
|
||||
|
||||
|
||||
const useAutoUpdater = () => {
|
||||
autoUpdater.on('error', message => {
|
||||
console.error('There was a problem updating the application');
|
||||
@@ -33,6 +33,7 @@ const useAutoUpdater = () => {
|
||||
});
|
||||
|
||||
autoUpdater.on('update-downloaded', () => {
|
||||
forceQuit = true;
|
||||
autoUpdater.quitAndInstall();
|
||||
});
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/mrvnklm/homeassistant-desktop"
|
||||
},
|
||||
"version": "1.2.0",
|
||||
"version": "1.2.1",
|
||||
"description": "Desktop App (Windows / macOS) for Home Assistant built with Electron",
|
||||
"main": "app.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user