mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 02:32:55 +08:00
Merge pull request #26920 from peppy/2fa-visibility
Give better visibility when the game is pending 2FA
This commit is contained in:
commit
5260b8cae0
@ -19,6 +19,11 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString Connecting => new TranslatableString(getKey(@"connecting"), @"Connecting...");
|
public static LocalisableString Connecting => new TranslatableString(getKey(@"connecting"), @"Connecting...");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Verification required"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString VerificationRequired => new TranslatableString(getKey(@"verification_required"), @"Verification required");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// "home"
|
/// "home"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -95,11 +95,10 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
|
|
||||||
private void onlineStateChanged(ValueChangedEvent<APIState> state) => Schedule(() =>
|
private void onlineStateChanged(ValueChangedEvent<APIState> state) => Schedule(() =>
|
||||||
{
|
{
|
||||||
failingIcon.FadeTo(state.NewValue == APIState.Failing ? 1 : 0, 200, Easing.OutQuint);
|
failingIcon.FadeTo(state.NewValue == APIState.Failing || state.NewValue == APIState.RequiresSecondFactorAuth ? 1 : 0, 200, Easing.OutQuint);
|
||||||
|
|
||||||
switch (state.NewValue)
|
switch (state.NewValue)
|
||||||
{
|
{
|
||||||
case APIState.RequiresSecondFactorAuth:
|
|
||||||
case APIState.Connecting:
|
case APIState.Connecting:
|
||||||
TooltipText = ToolbarStrings.Connecting;
|
TooltipText = ToolbarStrings.Connecting;
|
||||||
spinner.Show();
|
spinner.Show();
|
||||||
@ -108,6 +107,13 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
case APIState.Failing:
|
case APIState.Failing:
|
||||||
TooltipText = ToolbarStrings.AttemptingToReconnect;
|
TooltipText = ToolbarStrings.AttemptingToReconnect;
|
||||||
spinner.Show();
|
spinner.Show();
|
||||||
|
failingIcon.Icon = FontAwesome.Solid.ExclamationTriangle;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case APIState.RequiresSecondFactorAuth:
|
||||||
|
TooltipText = ToolbarStrings.VerificationRequired;
|
||||||
|
spinner.Show();
|
||||||
|
failingIcon.Icon = FontAwesome.Solid.Key;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case APIState.Offline:
|
case APIState.Offline:
|
||||||
|
@ -280,7 +280,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
sideFlashes.Delay(FADE_IN_DURATION).FadeIn(64, Easing.InQuint);
|
sideFlashes.Delay(FADE_IN_DURATION).FadeIn(64, Easing.InQuint);
|
||||||
}
|
}
|
||||||
else if (!api.IsLoggedIn)
|
else if (!api.IsLoggedIn || api.State.Value == APIState.RequiresSecondFactorAuth)
|
||||||
{
|
{
|
||||||
// copy out old action to avoid accidentally capturing logo.Action in closure, causing a self-reference loop.
|
// copy out old action to avoid accidentally capturing logo.Action in closure, causing a self-reference loop.
|
||||||
var previousAction = logo.Action;
|
var previousAction = logo.Action;
|
||||||
|
Loading…
Reference in New Issue
Block a user