Fixed an issue with registry scan, minor UI changes.
The registry scan function exited early if no Java Development Key was found. This has been corrected by redoing the exit checks. Social media buttons now lose focus after they are clicked to prevent a sticky appearance. Changed the load spinner to have the text rotate within the center image.
This commit is contained in:
parent
f0b21330a0
commit
848440ed1c
@ -2122,7 +2122,7 @@ p {
|
||||
/* Stationary image for the spinner. */
|
||||
#loadCenterImage {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
width: 277px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
@ -2130,6 +2130,7 @@ p {
|
||||
#loadSpinnerImage {
|
||||
width: 280px;
|
||||
height: auto;
|
||||
z-index: 400;
|
||||
}
|
||||
|
||||
/* Rotating animation for the spinner. */
|
||||
|
@ -854,15 +854,14 @@ class AssetGuard extends EventEmitter {
|
||||
// 'SOFTWARE\\JavaSoft\\JDK'
|
||||
// Forge does not yet support Java 9, therefore we do not.
|
||||
|
||||
let cbTracker = 0
|
||||
let cbAcc = 0
|
||||
|
||||
// Keys for Java 1.8 and prior:
|
||||
const regKeys = [
|
||||
'\\SOFTWARE\\JavaSoft\\Java Runtime Environment',
|
||||
'\\SOFTWARE\\JavaSoft\\Java Development Kit'
|
||||
]
|
||||
|
||||
let keysDone = 0
|
||||
|
||||
const candidates = new Set()
|
||||
|
||||
for(let i=0; i<regKeys.length; i++){
|
||||
@ -875,15 +874,26 @@ class AssetGuard extends EventEmitter {
|
||||
if(exists) {
|
||||
key.keys((err, javaVers) => {
|
||||
if(err){
|
||||
keysDone++
|
||||
console.error(err)
|
||||
if(i === regKeys.length-1 && cbAcc === cbTracker){
|
||||
|
||||
// REG KEY DONE
|
||||
// DUE TO ERROR
|
||||
if(keysDone === regKeys.length){
|
||||
resolve(candidates)
|
||||
}
|
||||
} else {
|
||||
cbTracker += javaVers.length
|
||||
if(i === regKeys.length-1 && cbTracker === cbAcc){
|
||||
if(javaVers.length === 0){
|
||||
// REG KEY DONE
|
||||
// NO SUBKEYS
|
||||
keysDone++
|
||||
if(keysDone === regKeys.length){
|
||||
resolve(candidates)
|
||||
}
|
||||
} else {
|
||||
|
||||
let numDone = 0
|
||||
|
||||
for(let j=0; j<javaVers.length; j++){
|
||||
const javaVer = javaVers[j]
|
||||
const vKey = javaVer.key.substring(javaVer.key.lastIndexOf('\\')+1)
|
||||
@ -893,25 +903,42 @@ class AssetGuard extends EventEmitter {
|
||||
const jHome = res.value
|
||||
if(jHome.indexOf('(x86)') === -1){
|
||||
candidates.add(jHome)
|
||||
}
|
||||
|
||||
}
|
||||
cbAcc++
|
||||
if(i === regKeys.length-1 && cbAcc === cbTracker){
|
||||
// SUBKEY DONE
|
||||
|
||||
numDone++
|
||||
if(numDone === javaVers.length){
|
||||
keysDone++
|
||||
if(keysDone === regKeys.length){
|
||||
resolve(candidates)
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
cbAcc++
|
||||
if(i === regKeys.length-1 && cbAcc === cbTracker){
|
||||
|
||||
// SUBKEY DONE
|
||||
// NOT JAVA 8
|
||||
|
||||
numDone++
|
||||
if(numDone === javaVers.length){
|
||||
keysDone++
|
||||
if(keysDone === regKeys.length){
|
||||
resolve(candidates)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
if(i === regKeys.length-1 && cbAcc === cbTracker){
|
||||
|
||||
// REG KEY DONE
|
||||
// DUE TO NON-EXISTANCE
|
||||
|
||||
keysDone++
|
||||
if(keysDone === regKeys.length){
|
||||
resolve(candidates)
|
||||
}
|
||||
}
|
||||
|
@ -130,6 +130,13 @@ document.addEventListener('readystatechange', function () {
|
||||
})
|
||||
})
|
||||
|
||||
// Remove focus from social media buttons once they're clicked.
|
||||
Array.from(document.getElementsByClassName('mediaURL')).map(val => {
|
||||
val.addEventListener('click', e => {
|
||||
document.activeElement.blur()
|
||||
})
|
||||
})
|
||||
|
||||
} else if(document.readyState === 'complete'){
|
||||
|
||||
//266.01
|
||||
|
Loading…
Reference in New Issue
Block a user