mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 11:42:14 -08:00
Fixes for the overlay on the settings UI.
The background of the settings UI is set to transparent when the overlay is toggled. The color of the frame bar has been adjusted to what it should actually be.
This commit is contained in:
parent
c0714ecbc6
commit
9769458499
@ -61,7 +61,7 @@ body, button {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
transition: background-color 1s ease;
|
transition: background-color 1s ease;
|
||||||
/*background-color: rgba(1, 2, 1, 0.5);*/
|
/*background-color: rgba(0, 0, 0, 0.5);*/
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -883,7 +883,8 @@ body, button {
|
|||||||
position: relative;
|
position: relative;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
background: rgba(0, 0, 0, 0.50);
|
background-color: rgba(0, 0, 0, 0.50);
|
||||||
|
transition: background-color 0.25s cubic-bezier(.02, .01, .47, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Drop shadow displayed when content is scrolled out of view. */
|
/* Drop shadow displayed when content is scrolled out of view. */
|
||||||
|
@ -30,12 +30,26 @@ function toggleOverlay(toggleState, dismissable = false, content = 'overlayConte
|
|||||||
} else {
|
} else {
|
||||||
$('#overlayDismiss').hide()
|
$('#overlayDismiss').hide()
|
||||||
}
|
}
|
||||||
$('#overlayContainer').fadeIn(250)
|
$('#overlayContainer').fadeIn({
|
||||||
|
duration: 250,
|
||||||
|
start: () => {
|
||||||
|
if(getCurrentView() === VIEWS.settings){
|
||||||
|
document.getElementById('settingsContainer').style.backgroundColor = 'transparent'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
document.getElementById('main').removeAttribute('overlay')
|
document.getElementById('main').removeAttribute('overlay')
|
||||||
// Make things tabbable.
|
// Make things tabbable.
|
||||||
$("#main *").removeAttr('tabindex')
|
$("#main *").removeAttr('tabindex')
|
||||||
$('#overlayContainer').fadeOut(250, () => {
|
$('#overlayContainer').fadeOut({
|
||||||
|
duration: 250,
|
||||||
|
start: () => {
|
||||||
|
if(getCurrentView() === VIEWS.settings){
|
||||||
|
document.getElementById('settingsContainer').style.backgroundColor = 'rgba(0, 0, 0, 0.50)'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
complete: () => {
|
||||||
$('#' + content).parent().children().hide()
|
$('#' + content).parent().children().hide()
|
||||||
$('#' + content).show()
|
$('#' + content).show()
|
||||||
if(dismissable){
|
if(dismissable){
|
||||||
@ -43,6 +57,7 @@ function toggleOverlay(toggleState, dismissable = false, content = 'overlayConte
|
|||||||
} else {
|
} else {
|
||||||
$('#overlayDismiss').hide()
|
$('#overlayDismiss').hide()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ const VIEWS = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// The currently shown view container.
|
// The currently shown view container.
|
||||||
let currentView = VIEWS.landing
|
let currentView
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Switch launcher views.
|
* Switch launcher views.
|
||||||
@ -63,7 +63,7 @@ function showMainUI(){
|
|||||||
updateSelectedServer(AssetGuard.getServerById(ConfigManager.getSelectedServer()).name)
|
updateSelectedServer(AssetGuard.getServerById(ConfigManager.getSelectedServer()).name)
|
||||||
refreshServerStatus()
|
refreshServerStatus()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
document.getElementById('frameBar').style.backgroundColor = 'rgba(1, 2, 1, 0.5)'
|
document.getElementById('frameBar').style.backgroundColor = 'rgba(0, 0, 0, 0.5)'
|
||||||
document.body.style.backgroundImage = `url('assets/images/backgrounds/${document.body.getAttribute('bkid')}.jpg')`
|
document.body.style.backgroundImage = `url('assets/images/backgrounds/${document.body.getAttribute('bkid')}.jpg')`
|
||||||
$('#main').show()
|
$('#main').show()
|
||||||
|
|
||||||
@ -82,11 +82,14 @@ function showMainUI(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(ConfigManager.isFirstLaunch()){
|
if(ConfigManager.isFirstLaunch()){
|
||||||
|
currentView = VIEWS.welcome
|
||||||
$(VIEWS.welcome).fadeIn(1000)
|
$(VIEWS.welcome).fadeIn(1000)
|
||||||
} else {
|
} else {
|
||||||
if(isLoggedIn){
|
if(isLoggedIn){
|
||||||
|
currentView = VIEWS.landing
|
||||||
$(VIEWS.landing).fadeIn(1000)
|
$(VIEWS.landing).fadeIn(1000)
|
||||||
} else {
|
} else {
|
||||||
|
currentView = VIEWS.login
|
||||||
$(VIEWS.login).fadeIn(1000)
|
$(VIEWS.login).fadeIn(1000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user