Merge pull request #1470 from cewert/app-spinner-to-login
Show loading spinner and disable remote during login
This commit is contained in:
commit
daf99dc7e2
|
@ -36,6 +36,8 @@ sub Main (args as dynamic) as void
|
||||||
' remove previous scenes from the stack
|
' remove previous scenes from the stack
|
||||||
sceneManager.callFunc("clearScenes")
|
sceneManager.callFunc("clearScenes")
|
||||||
|
|
||||||
|
stopLoadingSpinner()
|
||||||
|
|
||||||
' load home page
|
' load home page
|
||||||
sceneManager.currentUser = m.global.session.user.name
|
sceneManager.currentUser = m.global.session.user.name
|
||||||
group = CreateHomeGroup()
|
group = CreateHomeGroup()
|
||||||
|
|
|
@ -86,13 +86,13 @@ function LoginFlow()
|
||||||
end if
|
end if
|
||||||
' push all users to the user select view
|
' push all users to the user select view
|
||||||
userSelected = CreateUserSelectGroup(publicUsersNodes)
|
userSelected = CreateUserSelectGroup(publicUsersNodes)
|
||||||
|
|
||||||
SendPerformanceBeacon("AppDialogComplete") ' Roku Performance monitoring - Dialog Closed
|
SendPerformanceBeacon("AppDialogComplete") ' Roku Performance monitoring - Dialog Closed
|
||||||
if userSelected = "backPressed"
|
if userSelected = "backPressed"
|
||||||
session.server.Delete()
|
session.server.Delete()
|
||||||
unset_setting("server")
|
unset_setting("server")
|
||||||
goto start_login
|
goto start_login
|
||||||
else
|
else if userSelected <> ""
|
||||||
|
startMediaLoadingSpinner()
|
||||||
print "A public user was selected with username=" + userSelected
|
print "A public user was selected with username=" + userSelected
|
||||||
session.user.Update("name", userSelected)
|
session.user.Update("name", userSelected)
|
||||||
regex = CreateObject("roRegex", "[^a-zA-Z0-9\ \-\_]", "")
|
regex = CreateObject("roRegex", "[^a-zA-Z0-9\ \-\_]", "")
|
||||||
|
@ -140,6 +140,7 @@ function LoginFlow()
|
||||||
else
|
else
|
||||||
userSelected = ""
|
userSelected = ""
|
||||||
end if
|
end if
|
||||||
|
stopLoadingSpinner()
|
||||||
passwordEntry = CreateSigninGroup(userSelected)
|
passwordEntry = CreateSigninGroup(userSelected)
|
||||||
SendPerformanceBeacon("AppDialogComplete") ' Roku Performance monitoring - Dialog Closed
|
SendPerformanceBeacon("AppDialogComplete") ' Roku Performance monitoring - Dialog Closed
|
||||||
if passwordEntry = "backPressed"
|
if passwordEntry = "backPressed"
|
||||||
|
@ -480,6 +481,7 @@ function CreateSigninGroup(user = "")
|
||||||
else if type(msg) = "roSGNodeEvent"
|
else if type(msg) = "roSGNodeEvent"
|
||||||
node = msg.getNode()
|
node = msg.getNode()
|
||||||
if node = "submit"
|
if node = "submit"
|
||||||
|
startMediaLoadingSpinner()
|
||||||
' Validate credentials
|
' Validate credentials
|
||||||
activeUser = get_token(username.value, password.value)
|
activeUser = get_token(username.value, password.value)
|
||||||
if isValid(activeUser)
|
if isValid(activeUser)
|
||||||
|
@ -494,6 +496,7 @@ function CreateSigninGroup(user = "")
|
||||||
end if
|
end if
|
||||||
return "true"
|
return "true"
|
||||||
end if
|
end if
|
||||||
|
stopLoadingSpinner()
|
||||||
print "Login attempt failed..."
|
print "Login attempt failed..."
|
||||||
group.findNode("alert").text = tr("Login attempt failed.")
|
group.findNode("alert").text = tr("Login attempt failed.")
|
||||||
else if node = "quickConnect"
|
else if node = "quickConnect"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user