mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 12:13:57 +00:00
autoupgrade status
This commit is contained in:
parent
818f4eaa10
commit
64ab1bb111
@ -287,6 +287,10 @@ ipcMain.handle('openExternal', async (event, url) => {
|
||||
});
|
||||
ipcMain.handle('downloadUpdate', async (event, url) => {
|
||||
autoUpdater.downloadUpdate();
|
||||
changeAppUpdateStatus({
|
||||
icon: 'icon loading',
|
||||
message: `Downloading update...`,
|
||||
});
|
||||
});
|
||||
ipcMain.on('applyUpdate', async (event, url) => {
|
||||
autoUpdater.quitAndInstall(false, true);
|
||||
@ -473,12 +477,17 @@ autoUpdater.on('checking-for-update', () => {
|
||||
|
||||
autoUpdater.on('update-available', info => {
|
||||
console.log('Update available', info);
|
||||
changeAppUpdateStatus({
|
||||
icon: 'icon download',
|
||||
message: `New version ${info.version} available`,
|
||||
});
|
||||
if (!autoUpdater.autoDownload) {
|
||||
if (autoUpdater.autoDownload) {
|
||||
changeAppUpdateStatus({
|
||||
icon: 'icon loading',
|
||||
message: `Downloading update...`,
|
||||
});
|
||||
} else {
|
||||
mainWindow.webContents.send('update-available', info.version);
|
||||
changeAppUpdateStatus({
|
||||
icon: 'icon download',
|
||||
message: `New version ${info.version} available`,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user