Improvements to overlay keybinds.

Added dynamic keybinder for overlays. If dismissable, the Escape key will dismiss the overlay. If not dismissable, Enter & Escape will trigger the main button.
If the selected account is not valid and you have more than one other account, you may cancel logging in to return to the original error overlay.
Updated electron-builder@20.28.2.
Fixed minor bug where the background of the settings UI was set to transparent. This occurred if the validation error overlay was shown on the settings UI, and you chose the login option.
This commit is contained in:
Daniel Scalzi
2018-08-22 10:54:09 -04:00
parent afe69a21c6
commit 37606dc8d2
8 changed files with 99 additions and 56 deletions

View File

@@ -220,6 +220,7 @@ function resolveError(err){
let loginViewOnSuccess = VIEWS.landing
let loginViewOnCancel = VIEWS.settings
let loginViewCancelHandler
function loginCancelEnabled(val){
if(val){
@@ -232,6 +233,10 @@ function loginCancelEnabled(val){
loginCancelButton.onclick = (e) => {
switchView(getCurrentView(), loginViewOnCancel, 500, 500, () => {
loginCancelEnabled(false)
if(loginViewCancelHandler != null){
loginViewCancelHandler()
loginViewCancelHandler = null
}
})
}
@@ -260,6 +265,7 @@ loginButton.addEventListener('click', () => {
}
loginViewOnSuccess = VIEWS.landing // Reset this for good measure.
loginCancelEnabled(false) // Reset this for good measure.
loginViewCancelHandler = null // Reset this for good measure.
loginUsername.value = ''
loginPassword.value = ''
$('.circle-loader').toggleClass('load-complete')