Update notifications

Removed the shit tone of check for updates, made it manual
Redone the function in utils
Logging for autoupdater implemented
This commit is contained in:
Core 2022-02-27 18:34:40 +00:00
parent a5e22d5f0d
commit 89e0d7c104
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6
6 changed files with 79 additions and 24 deletions

View file

@ -64,7 +64,6 @@ const store = new Vuex.Store({
}
}
})
ipcRenderer.send('check-for-update')
const app = new Vue({
el: "#app",
store: store,
@ -3950,6 +3949,18 @@ const app = new Vue({
},
checkForUpdate() {
ipcRenderer.send('check-for-update')
ipcRenderer.on('update-response', (event, res) => {
if (res === "update-not-available") {
notyf.error(app.getLz(`settings.notyf.updateCider.${res}`))
} else if (res === "update-downloaded") {
notyf.success(app.getLz(`settings.notyf.updateCider.${res}`))
} else if (res === "update-error") {
notyf.error(app.getLz(`settings.notyf.updateCider.${res}`))
} else if (res === "update-timeout") {
notyf.error(app.getLz(`settings.notyf.updateCider.${res}`))
}
})
},
}
})