Error messaging for login failures and logo

This commit is contained in:
Matthew Crowson 2019-04-27 10:44:14 -04:00
parent 12a8bff382
commit 7d20e4d273
4 changed files with 20 additions and 10 deletions

View File

@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<component name="ConfigScene" extends="Scene">
<children>
<Overhang
id="overhang"
title="Configure"
/>
<label text="Enter Configuration"
id="prompt"
font="font:LargeBoldSystemFont"
@ -13,6 +17,10 @@
text="Submit"
showFocusFootprint="false"
translation="[150, 450]" />
<label text=""
id="alert"
font="font:MediumSystemFont"
translation="[150, 550]" />
</children>
<script type="text/brightscript" uri="pkg:/components/config/scene.brs"/>
</component>

View File

@ -7,6 +7,8 @@ BANNER_SOURCE=banner-dark.svg
OUTPUT_DIR=./images
[ ! -d $OUTPUT_DIR ] && mkdir -p OUTPUT_DIR
# Don't need to keep re-downloading things we already have
if [ ! -e $ICON_SOURCE ]; then
wget $BRANDING_ROOT/$ICON_SOURCE > /dev/null

View File

@ -27,15 +27,6 @@ sub LoginFlow()
ShowServerSelect()
end if
if ServerInfo() = invalid
' Maybe don't unset setting, but offer as a prompt
' Server not found, is it online? New values / Retry
print "Connection to server failed, restart flow"
SignOut()
unset_setting("server")
goto start_login
end if
if get_setting("active_user") = invalid then
print "Get user login"
ShowSigninSelect()

View File

@ -35,7 +35,15 @@ sub ShowServerSelect()
if node = "submit"
set_setting("server", server_hostname.value)
set_setting("port", server_port.value)
return
if ServerInfo() = invalid then
' Maybe don't unset setting, but offer as a prompt
' Server not found, is it online? New values / Retry
print "Server not found, is it online? New values / Retry"
scene.findNode("alert").text = "Server not found, is it online?"
SignOut()
else
return
endif
end if
end if
end while
@ -82,6 +90,7 @@ sub ShowSignInSelect()
get_token(username.value, password.value)
if get_setting("active_user") <> invalid then return
print "Login attempt failed..."
scene.findNode("alert").text = "Login attempt failed."
end if
end if
end while