mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 16:22:54 +08:00
Merge pull request #6662 from GSculerlor/signin-ux-improvement
Add feedback to user when sign in form isn't filled
This commit is contained in:
commit
7204ecf166
@ -200,6 +200,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
|||||||
{
|
{
|
||||||
private TextBox username;
|
private TextBox username;
|
||||||
private TextBox password;
|
private TextBox password;
|
||||||
|
private ShakeContainer shakeSignIn;
|
||||||
private IAPIProvider api;
|
private IAPIProvider api;
|
||||||
|
|
||||||
public Action RequestHide;
|
public Action RequestHide;
|
||||||
@ -208,6 +209,8 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
|||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(username.Text) && !string.IsNullOrEmpty(password.Text))
|
if (!string.IsNullOrEmpty(username.Text) && !string.IsNullOrEmpty(password.Text))
|
||||||
api.Login(username.Text, password.Text);
|
api.Login(username.Text, password.Text);
|
||||||
|
else
|
||||||
|
shakeSignIn.Shake();
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader(permitNulls: true)]
|
[BackgroundDependencyLoader(permitNulls: true)]
|
||||||
@ -244,11 +247,24 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
|||||||
LabelText = "Stay signed in",
|
LabelText = "Stay signed in",
|
||||||
Bindable = config.GetBindable<bool>(OsuSetting.SavePassword),
|
Bindable = config.GetBindable<bool>(OsuSetting.SavePassword),
|
||||||
},
|
},
|
||||||
new SettingsButton
|
new Container
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
shakeSignIn = new ShakeContainer
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Child = new SettingsButton
|
||||||
{
|
{
|
||||||
Text = "Sign in",
|
Text = "Sign in",
|
||||||
Action = performLogin
|
Action = performLogin
|
||||||
},
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
new SettingsButton
|
new SettingsButton
|
||||||
{
|
{
|
||||||
Text = "Register",
|
Text = "Register",
|
||||||
|
Loading…
Reference in New Issue
Block a user