URGENT FIX
Fixed an issue that caused the login token to become invalid on using another launcher Fixed an issue that prevented you from logging out Removed Logo Seal from the login screen (Un necessary placement) Made the status colours easy to understand. (Brighter and more vibrant colours.
This commit is contained in:
parent
71123b55a9
commit
14e266c556
@ -67,14 +67,14 @@ const statuses = [
|
||||
exports.statusToHex = function(status){
|
||||
switch(status.toLowerCase()){
|
||||
case 'green':
|
||||
return '#a5c325'
|
||||
return '#4DDD19'
|
||||
case 'yellow':
|
||||
return '#eac918'
|
||||
return '#FFE300'
|
||||
case 'red':
|
||||
return '#c32625'
|
||||
case 'grey':
|
||||
default:
|
||||
return '#848484'
|
||||
return '#3B3B3B'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -396,20 +396,6 @@ ipcRenderer.on('MSALoginWindowReply', (event, ...args) => {
|
||||
// Temporary workaround
|
||||
if (loginViewOnSuccess === VIEWS.settings) {
|
||||
prepareSettings()
|
||||
if(hasRPC){
|
||||
DiscordWrapper.updateDetails('In the Settings...')
|
||||
DiscordWrapper.clearState()
|
||||
}
|
||||
} else {
|
||||
if(hasRPC){
|
||||
if(ConfigManager.getSelectedServer()){
|
||||
const serv = DistroManager.getDistribution().getServer(ConfigManager.getSelectedServer())
|
||||
DiscordWrapper.updateDetails('Ready to Play!')
|
||||
DiscordWrapper.updateState('Modpack: ' + serv.getName())
|
||||
} else {
|
||||
DiscordWrapper.updateDetails('Landing Screen...')
|
||||
}
|
||||
}
|
||||
}
|
||||
loginViewOnSuccess = VIEWS.landing // Reset this for good measure.
|
||||
loginCancelEnabled(false) // Reset this for good measure.
|
||||
|
@ -42,6 +42,21 @@ document.addEventListener('click', closeSettingsSelect)
|
||||
|
||||
bindSettingsSelect()
|
||||
|
||||
function bindFolderOpeners(){
|
||||
for(let ele of document.getElementsByClassName('settingsFolderOpenButton')){
|
||||
ele.onclick = async e => {
|
||||
const pathId = ele.getAttribute('pathId')
|
||||
if(pathId){
|
||||
if(pathId === 'DataDirectory'){
|
||||
shell.openPath(ConfigManager.getDataDirectory())
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bindFolderOpeners()
|
||||
|
||||
function bindFileSelectors(){
|
||||
for(let ele of document.getElementsByClassName('settingsFileSelButton')){
|
||||
@ -269,9 +284,9 @@ function settingsNavItemListener(ele, fade = true){
|
||||
document.getElementById(selectedSettingsTab).onscroll = settingsTabScrollListener
|
||||
|
||||
if(fade){
|
||||
$(`#${prevTab}`).fadeOut(250, () => {
|
||||
$(`#${prevTab}`).fadeOut(150, () => {
|
||||
$(`#${selectedSettingsTab}`).fadeIn({
|
||||
duration: 250,
|
||||
duration: 150,
|
||||
start: () => {
|
||||
settingsTabScrollListener({
|
||||
target: document.getElementById(selectedSettingsTab)
|
||||
@ -316,7 +331,7 @@ settingsNavDone.onclick = () => {
|
||||
if(ConfigManager.getSelectedServer()){
|
||||
const serv = DistroManager.getDistribution().getServer(ConfigManager.getSelectedServer())
|
||||
DiscordWrapper.updateDetails('Ready to Play!')
|
||||
DiscordWrapper.updateState('Modpack: ' + serv.getName())
|
||||
DiscordWrapper.updateState('Server: ' + serv.getName())
|
||||
} else {
|
||||
DiscordWrapper.updateDetails('Landing Screen...')
|
||||
}
|
||||
@ -329,7 +344,7 @@ settingsNavDone.onclick = () => {
|
||||
|
||||
// Bind the add account button.
|
||||
document.getElementById('settingsAddAccount').onclick = (e) => {
|
||||
switchView(getCurrentView(), VIEWS.login, 500, 500, () => {
|
||||
switchView(getCurrentView(), VIEWS.login, 250, 250, () => {
|
||||
loginViewOnCancel = VIEWS.settings
|
||||
loginViewOnSuccess = VIEWS.settings
|
||||
loginCancelEnabled(true)
|
||||
@ -352,10 +367,10 @@ function bindServerCodeButtons(){
|
||||
if(!ConfigManager.getServerCodes().includes(code) && code){
|
||||
ConfigManager.getServerCodes().push(code)
|
||||
ConfigManager.save()
|
||||
loggerSettings.log('Added modpack code to configuration and saved it')
|
||||
loggerSettings.log('Added server code to configuration and saved it')
|
||||
prepareLauncherTab()
|
||||
} else {
|
||||
loggerSettings.log('Modpack code already exists or is empty, not adding.')
|
||||
loggerSettings.log('Server code already exists or is empty, not adding.')
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -373,7 +388,7 @@ function bindServerCodeButtons(){
|
||||
prepareLauncherTab()
|
||||
}
|
||||
}
|
||||
loggerSettings.log('Modpack code doesnt exist!, not removing.')
|
||||
loggerSettings.log('Server code doesnt exist!, not removing.')
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -440,6 +455,8 @@ function bindAuthAccountLogOut(){
|
||||
})
|
||||
}
|
||||
|
||||
let data = null
|
||||
|
||||
/**
|
||||
* Process a log out.
|
||||
*
|
||||
@ -451,9 +468,11 @@ function bindAuthAccountLogOut(){
|
||||
val,
|
||||
isLastAccount
|
||||
}
|
||||
if (!skip) {
|
||||
|
||||
const parent = val.closest('.settingsAuthAccount')
|
||||
const uuid = parent.getAttribute('uuid')
|
||||
|
||||
if (!skip) {
|
||||
const account = ConfigManager.getAuthAccount(uuid)
|
||||
if (account.type === 'microsoft') {
|
||||
toggleOverlay(true, false, 'msOverlay')
|
||||
@ -469,7 +488,7 @@ function bindAuthAccountLogOut(){
|
||||
validateSelectedAccount()
|
||||
}
|
||||
})
|
||||
$(parent).fadeOut(250, () => {
|
||||
$(parent).fadeOut(150, () => {
|
||||
parent.remove()
|
||||
})
|
||||
}
|
||||
@ -479,7 +498,6 @@ ipcRenderer.on('MSALogoutWindowReply', (event, ...args) => {
|
||||
processLogOut(data.val, data.isLastAccount, true)
|
||||
})
|
||||
|
||||
|
||||
/**
|
||||
* Refreshes the status of the selected account on the auth account
|
||||
* elements.
|
||||
@ -743,6 +761,7 @@ function resolveDropinModsForUI(){
|
||||
let dropinMods = ''
|
||||
|
||||
for(dropin of CACHE_DROPIN_MODS){
|
||||
|
||||
dropinMods += `<div id="${dropin.fullName}" class="settingsBaseMod settingsDropinMod" ${!dropin.disabled ? 'enabled' : ''}>
|
||||
<div class="settingsModContent">
|
||||
<div class="settingsModMainWrapper">
|
||||
@ -799,7 +818,6 @@ function resolveServerCodesForUI(){
|
||||
const code = ele.getAttribute('code')
|
||||
const servs = DistroManager.getDistribution().getServersFromCode(code)
|
||||
const valid = servs && servs.length
|
||||
loggerSettings.log('valid: ' + valid)
|
||||
if(valid){
|
||||
for(let serv of servs){
|
||||
loggerSettings.log('server: ' + serv.getName())
|
||||
@ -824,9 +842,9 @@ function resolveServerCodesForUI(){
|
||||
function bindDropinModsRemoveButton() {
|
||||
const sEls = settingsModsContainer.querySelectorAll('[remmod]')
|
||||
Array.from(sEls).map((v, index, arr) => {
|
||||
v.onclick = async () => {
|
||||
v.onclick = () => {
|
||||
const fullName = v.getAttribute('remmod')
|
||||
const res = await DropinModUtil.deleteDropinMod(CACHE_SETTINGS_MODS_DIR, fullName)
|
||||
const res = DropinModUtil.deleteDropinMod(CACHE_SETTINGS_MODS_DIR, fullName)
|
||||
if (res) {
|
||||
document.getElementById(fullName).remove()
|
||||
} else {
|
||||
@ -905,7 +923,6 @@ document.addEventListener('keydown', (e) => {
|
||||
if (getCurrentView() === VIEWS.settings && selectedSettingsTab === 'settingsTabMods') {
|
||||
if (e.key === 'F5') {
|
||||
reloadDropinMods()
|
||||
saveShaderpackSettings()
|
||||
resolveShaderpacksForUI()
|
||||
}
|
||||
}
|
||||
@ -998,6 +1015,7 @@ function bindShaderpackButton() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Server status bar functions.
|
||||
|
||||
/**
|
||||
@ -1007,23 +1025,12 @@ function loadSelectedServerOnModsTab(){
|
||||
const serv = DistroManager.getDistribution().getServer(ConfigManager.getSelectedServer())
|
||||
|
||||
document.getElementById('settingsSelServContent').innerHTML = `
|
||||
<img class="serverListingImg" src="${serv.getIcon()}"/>
|
||||
<div class="serverListingDetails">
|
||||
<img class="serverListingImg" src="${serv.getIcon()}"/>
|
||||
<span class="serverListingName">${serv.getName()}</span>
|
||||
<span class="serverListingDescription">${serv.getDescription()}</span>
|
||||
<div class="serverListingInfo">
|
||||
<div class="serverListingVersion">${serv.getMinecraftVersion()}</div>
|
||||
<div class="serverListingRevision">${serv.getVersion()}</div>
|
||||
${serv.isMainServer() ? `<div class="serverListingStarWrapper">
|
||||
<svg id="Layer_1" viewBox="0 0 107.45 104.74" width="20px" height="20px">
|
||||
<defs>
|
||||
<style>.cls-1{fill:#fff;}.cls-2{fill:none;stroke:#fff;stroke-miterlimit:10;}</style>
|
||||
</defs>
|
||||
<path class="cls-1" d="M100.93,65.54C89,62,68.18,55.65,63.54,52.13c2.7-5.23,18.8-19.2,28-27.55C81.36,31.74,63.74,43.87,58.09,45.3c-2.41-5.37-3.61-26.52-4.37-39-.77,12.46-2,33.64-4.36,39-5.7-1.46-23.3-13.57-33.49-20.72,9.26,8.37,25.39,22.36,28,27.55C39.21,55.68,18.47,62,6.52,65.55c12.32-2,33.63-6.06,39.34-4.9-.16,5.87-8.41,26.16-13.11,37.69,6.1-10.89,16.52-30.16,21-33.9,4.5,3.79,14.93,23.09,21,34C70,86.84,61.73,66.48,61.59,60.65,67.36,59.49,88.64,63.52,100.93,65.54Z"/>
|
||||
<circle class="cls-2" cx="53.73" cy="53.9" r="38"/>
|
||||
</svg>
|
||||
<span class="serverListingStarTooltip">Main Server</span>
|
||||
</div>` : ''}
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
@ -1049,9 +1056,9 @@ function saveAllModConfigurations(){
|
||||
* server is changed.
|
||||
*/
|
||||
function animateModsTabRefresh(){
|
||||
$('#settingsTabMods').fadeOut(500, () => {
|
||||
$('#settingsTabMods').fadeOut(150, () => {
|
||||
prepareModsTab()
|
||||
$('#settingsTabMods').fadeIn(500)
|
||||
$('#settingsTabMods').fadeIn(150)
|
||||
})
|
||||
}
|
||||
|
||||
@ -1319,6 +1326,9 @@ document.getElementById('settingsAboutDevToolsButton').onclick = (e) => {
|
||||
*/
|
||||
function isPrerelease(version) {
|
||||
const preRelComp = semver.prerelease(version)
|
||||
if(preRelComp != null && preRelComp.includes('release')) {
|
||||
return false
|
||||
}
|
||||
return preRelComp != null && preRelComp.length > 0
|
||||
}
|
||||
|
||||
@ -1357,7 +1367,7 @@ function populateAboutVersionInformation(){
|
||||
*/
|
||||
function populateReleaseNotes() {
|
||||
$.ajax({
|
||||
url: 'https://github.com/VicariousNetwork/HeliosLauncher/releases.atom',
|
||||
url: 'https://github.com/ModRealms-Network/HeliosLauncher/releases.atom',
|
||||
success: (data) => {
|
||||
const version = 'v' + remote.app.getVersion()
|
||||
const entries = $(data).find('entry')
|
||||
@ -1375,7 +1385,7 @@ function populateReleaseNotes(){
|
||||
}
|
||||
|
||||
},
|
||||
timeout: 2500
|
||||
timeout: 10000
|
||||
}).catch(err => {
|
||||
settingsAboutChangelogText.innerHTML = 'Failed to load release notes.'
|
||||
})
|
||||
@ -1436,7 +1446,7 @@ function populateSettingsUpdateInformation(data){
|
||||
shell.openExternal(data.darwindownload)
|
||||
})
|
||||
} else {
|
||||
settingsUpdateButtonStatus('Downloading..', true)
|
||||
settingsUpdateButtonStatus('Downloading...', true)
|
||||
}
|
||||
} else {
|
||||
settingsUpdateTitle.innerHTML = 'You Are Running the Latest Version'
|
||||
|
@ -7,8 +7,7 @@
|
||||
</div>
|
||||
<div id="loginContent">
|
||||
<form id="loginForm">
|
||||
<img id="loginImageSeal" src="assets/images/SealCircle.png" />
|
||||
<span id="loginSubheader">MINECRAFT LOGIN</span>
|
||||
<span id="loginSubheader">MOJANG LOGIN</span>
|
||||
<div class="loginFieldContainer">
|
||||
<svg id="profileSVG" class="loginSVG" viewBox="40 37 65.36 61.43">
|
||||
<g>
|
||||
|
Loading…
Reference in New Issue
Block a user