This repository was archived by the owner on Apr 14, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -979,20 +979,21 @@ $("#preset-name").on("input", function () {
979979
980980$ ( document ) . ready ( function ( ) {
981981 ipcRenderer . on ( "check-for-updates-response-none" , function ( ) {
982- console . log ( "renderer on check none" ) ;
983982 $ ( "#button-check-for-updates" ) . text ( "No Updates!" ) ;
984983 setTimeout ( function ( ) {
985984 $ ( "#button-check-for-updates" ) . text ( "Update!" ) ;
986985 } , 2000 ) ;
987986 } ) ;
988987
989- ipcRenderer . on ( "check-for-updates-response-updating" , function ( ) {
990- console . log ( "renderer on check updating" ) ;
991- $ ( "#button-check-for-updates" ) . text ( "Updating..." ) ;
988+ ipcRenderer . on ( "check-for-updates-response-download" , function ( event , downloadPercentage ) {
989+ $ ( "#button-check-for-updates" ) . text ( `${ downloadPercentage } downloaded` ) ;
990+ } ) ;
991+
992+ ipcRenderer . on ( "check-for-updates-response-downloaded" , function ( ) {
993+ $ ( "#button-check-for-updates" ) . text ( `Installing...` ) ;
992994 } ) ;
993995
994996 ipcRenderer . on ( "check-for-updates-response-checking" , function ( ) {
995- console . log ( "renderer on check search" ) ;
996997 $ ( "#button-check-for-updates" ) . text ( "Searching..." ) ;
997998 } ) ;
998999
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ autoUpdater.on("checking-for-update", function (_arg1) {
1818 return log . info ( "Checking for update..." ) ;
1919} ) ;
2020autoUpdater . on ( "update-available" , function ( _arg2 ) {
21- mainWindow . webContents . send ( "check-for-updates-response-updating " ) ;
21+ mainWindow . webContents . send ( "check-for-updates-response-download" , "0% ") ;
2222 return log . info ( "Update available." ) ;
2323} ) ;
2424autoUpdater . on ( "update-not-available" , function ( _arg3 ) {
@@ -29,11 +29,11 @@ autoUpdater.on("error", function (err) {
2929 return log . info ( "Error in auto-updater. " + err ) ;
3030} ) ;
3131autoUpdater . on ( "download-progress" , function ( progressObj ) {
32- mainWindow . webContents . send ( "check-for-updates-response-updating" ) ;
32+ mainWindow . webContents . send ( "check-for-updates-response-download" , ` ${ progressObj . percent . toFixed ( 0 ) } %` ) ;
3333 return log . info ( "Downloading update." ) ;
3434} ) ;
3535autoUpdater . on ( "update-downloaded" , function ( _arg4 ) {
36- mainWindow . webContents . send ( "check-for-updates-response-updating " ) ;
36+ mainWindow . webContents . send ( "check-for-updates-response-downloaded " ) ;
3737 autoUpdater . quitAndInstall ( ) ;
3838 return log . info ( "Update downloaded." ) ;
3939} ) ;
You can’t perform that action at this time.
0 commit comments