Skip to content

Commit

Permalink
Show installing progress bar during extractions.
Browse files Browse the repository at this point in the history
  • Loading branch information
dscalzi committed Jul 2, 2018
1 parent 41aae0c commit 6759b14
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions app/assets/js/scripts/landing.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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()
Expand Down Expand Up @@ -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 = ''
Expand Down Expand Up @@ -556,6 +562,7 @@ function dlAsync(login = true){
setOverlayHandler(null)
}

remote.getCurrentWindow().setProgressBar(-1)
toggleOverlay(true)
toggleLaunchArea(false)

Expand All @@ -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)
Expand Down

0 comments on commit 6759b14

Please sign in to comment.