Improve auto update

Add titles to status bar buttons
Bump version to 1.0.7
This commit is contained in:
Jonatan Heyman
2023-03-07 01:45:23 +01:00
parent 1df255032c
commit 93bf1e9036
7 changed files with 106 additions and 44 deletions

View File

@@ -65,11 +65,12 @@ ipcMain.handle(UPDATE_INSTALL_AND_RESTART, () => {
ipcMain.handle(UPDATE_CHECK_FOR_UPDATES, () => {
autoUpdater.checkForUpdates()
// for development, the autoUpdater will not work, so we need to trigger the event manually
if (process.env.NODE_ENV === "development") {
window?.webContents.send(UPDATE_NOT_AVAILABLE_EVENT)
}
})
export function checkForUpdates(win) {
export function initializeAutoUpdate(win) {
window = win
// check for updates
autoUpdater.checkForUpdates()
}

View File

@@ -9,7 +9,7 @@ import { WINDOW_CLOSE_EVENT, SETTINGS_CHANGE_EVENT } from '../constants';
import CONFIG from "../config"
import { onBeforeInputEvent } from "../keymap"
import { isMac } from '../detect-platform';
import { checkForUpdates } from './auto-update';
import { initializeAutoUpdate } from './auto-update';
// The built directory structure
@@ -138,7 +138,7 @@ async function createWindow() {
}
app.whenReady().then(createWindow).then(async () => {
checkForUpdates(win)
initializeAutoUpdate(win)
})
app.on('window-all-closed', () => {