mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2026-11-05 17:44:16 +00:00
Improve login flow a smidge by showing an error message and re-enabling the sign in button on failure
This commit is contained in:
@@ -106,6 +106,11 @@ module W3DHubLauncher
|
||||
if response.okay?
|
||||
hash = JSON.parse(response.data)
|
||||
|
||||
if hash["error"]
|
||||
result.error = hash["error"]
|
||||
return result
|
||||
end
|
||||
|
||||
user_details_result = fetch_user_details(Integer(hash["userid"]))
|
||||
user_details_hash = user_details_result.okay? ? JSON.parse(user_details_result.data) : {}
|
||||
|
||||
@@ -134,6 +139,11 @@ module W3DHubLauncher
|
||||
if response.okay?
|
||||
hash = JSON.parse(response.data)
|
||||
|
||||
if hash["error"]
|
||||
result.error = hash["error"]
|
||||
return result
|
||||
end
|
||||
|
||||
user_details_result = fetch_user_details(Integer(hash["userid"]))
|
||||
user_details_hash = user_details_result.okay? ? JSON.parse(user_details_result.data) : {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user