Show progress bar while downloading update

This commit is contained in:
Yuya Ochiai
2017-12-14 01:52:48 +09:00
parent ca97a819f9
commit 32ea776ed3
3 changed files with 94 additions and 39 deletions

View File

@@ -102,8 +102,12 @@ function initialize(appState, mainWindow, notifyOnly = false) {
}, INTERVAL_48_HOURS_IN_MS);
updaterModal.close();
}).on('click-install', () => {
updaterModal.webContents.send('start-download');
autoUpdater.signals.progress((data) => { // eslint-disable-line max-nested-callbacks
updaterModal.send('progress', Math.floor(data.percent));
console.log('progress:', data);
});
downloadAndInstall();
updaterModal.close();
}).on('click-download', () => {
shell.openExternal('https://about.mattermost.com/download/#mattermostApps');
}).on('click-release-notes', () => {