1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-14 05:07:26 +08:00

Add forgotten password link to login form

This commit is contained in:
Dean Herbert 2022-07-06 01:25:04 +09:00
parent 85e589f863
commit 3a68f386a8

View File

@ -49,6 +49,7 @@ namespace osu.Game.Overlays.Login
RelativeSizeAxes = Axes.X;
ErrorTextFlowContainer errorText;
LinkFlowContainer forgottenPaswordLink;
Children = new Drawable[]
{
@ -80,6 +81,12 @@ namespace osu.Game.Overlays.Login
LabelText = "Stay signed in",
Current = config.GetBindable<bool>(OsuSetting.SavePassword),
},
forgottenPaswordLink = new LinkFlowContainer
{
Padding = new MarginPadding { Left = SettingsPanel.CONTENT_MARGINS },
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
},
new Container
{
RelativeSizeAxes = Axes.X,
@ -109,6 +116,8 @@ namespace osu.Game.Overlays.Login
}
};
forgottenPaswordLink.AddLink(LayoutStrings.PopupLoginLoginForgot, "https://osu.ppy.sh/home/password-reset");
password.OnCommit += (_, _) => performLogin();
if (api?.LastLoginError?.Message is string error)