mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 01:47:30 +09:00
Add UI support for redirecting the user to web registration
This commit is contained in:
parent
a7327b02a2
commit
4d58e6d8d2
@ -47,6 +47,9 @@ namespace osu.Game.Overlays.AccountCreation
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private GameHost host { get; set; }
|
private GameHost host { get; set; }
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private OsuGame game { get; set; }
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
@ -194,9 +197,20 @@ namespace osu.Game.Overlays.AccountCreation
|
|||||||
{
|
{
|
||||||
if (errors != null)
|
if (errors != null)
|
||||||
{
|
{
|
||||||
usernameDescription.AddErrors(errors.User.Username);
|
if (errors.User != null)
|
||||||
emailAddressDescription.AddErrors(errors.User.Email);
|
{
|
||||||
passwordDescription.AddErrors(errors.User.Password);
|
usernameDescription.AddErrors(errors.User.Username);
|
||||||
|
emailAddressDescription.AddErrors(errors.User.Email);
|
||||||
|
passwordDescription.AddErrors(errors.User.Password);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(errors.Redirect))
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(errors.Message))
|
||||||
|
passwordDescription.AddErrors(new[] { errors.Message });
|
||||||
|
|
||||||
|
game.OpenUrlExternally(errors.Redirect);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user