Преглед на файлове

Show installing progress bar during extractions.

Daniel Scalzi преди 7 години
родител
ревизия
6759b143c4
променени са 1 файла, в които са добавени 10 реда и са изтрити 3 реда
  1. 10 3
      app/assets/js/scripts/landing.js

+ 10 - 3
app/assets/js/scripts/landing.js

@@ -363,8 +363,8 @@ function asyncSystemScan(launchAfter = true){
                 // Downloading..
                 setDownloadPercentage(m.value, m.total, m.percent)
             } else if(m.task === 1){
-                // Download will be at 100%, remove the loading from the OS progress bar.
-                remote.getCurrentWindow().setProgressBar(-1)
+                // Show installing progress bar.
+                remote.getCurrentWindow().setProgressBar(2)
 
                 // Wait for extration to complete.
                 const eLStr = 'Extracting'
@@ -381,6 +381,9 @@ function asyncSystemScan(launchAfter = true){
 
             } else if(m.task === 2){
 
+                // Download & extraction complete, remove the loading from the OS progress bar.
+                remote.getCurrentWindow().setProgressBar(-1)
+
                 // Extraction completed successfully.
                 ConfigManager.setJavaExecutable(m.jPath)
                 ConfigManager.save()
@@ -523,6 +526,9 @@ function dlAsync(login = true){
 
             } else if(m.task === 0.7){
                 
+                // Show installing progress bar.
+                remote.getCurrentWindow().setProgressBar(2)
+
                 // Download done, extracting.
                 const eLStr = 'Extracting libraries'
                 let dotStr = ''
@@ -556,6 +562,7 @@ function dlAsync(login = true){
                     setOverlayHandler(null)
                 }
 
+                remote.getCurrentWindow().setProgressBar(-1)
                 toggleOverlay(true)
                 toggleLaunchArea(false)
 
@@ -564,7 +571,7 @@ function dlAsync(login = true){
 
             } else if(m.task === 1){
 
-                // Download will be at 100%, remove the loading from the OS progress bar.
+                // Download and extraction complete, remove the loading from the OS progress bar.
                 remote.getCurrentWindow().setProgressBar(-1)
                 if(progressListener != null){
                     clearInterval(progressListener)