u
This commit is contained in:
@@ -60,8 +60,8 @@
|
||||
Dense="true"
|
||||
Elevation="0"
|
||||
Class="mb-2">
|
||||
@(_errorMessage)
|
||||
</MudAlert>
|
||||
@(_errorMessage)
|
||||
</MudAlert>
|
||||
}
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(_infoMessage))
|
||||
@@ -70,8 +70,8 @@
|
||||
Dense="true"
|
||||
Elevation="0"
|
||||
Class="mb-2">
|
||||
@(_infoMessage)
|
||||
</MudAlert>
|
||||
@(_infoMessage)
|
||||
</MudAlert>
|
||||
}
|
||||
|
||||
<MudStack Spacing="2">
|
||||
@@ -104,9 +104,12 @@
|
||||
}
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<MudButton Variant="Variant.Text"
|
||||
OnClick="Cancel"
|
||||
Disabled="_isBusy">لغو</MudButton>
|
||||
@if (!HideCancelButton)
|
||||
{
|
||||
<MudButton Variant="Variant.Text"
|
||||
OnClick="Cancel"
|
||||
Disabled="_isBusy">لغو</MudButton>
|
||||
}
|
||||
@if (_currentStep == AuthStep.Phone)
|
||||
{
|
||||
<MudButton Variant="Variant.Filled"
|
||||
|
||||
@@ -11,6 +11,9 @@ namespace FrontOffice.Main.Shared;
|
||||
|
||||
public partial class AuthDialog : IDisposable
|
||||
{
|
||||
[Parameter]
|
||||
public bool HideCancelButton { get; set; } = false;
|
||||
|
||||
private enum AuthStep { Phone, Verify }
|
||||
private const int DefaultResendCooldown = 120;
|
||||
public const int MaxVerificationAttempts = 5;
|
||||
@@ -439,5 +442,5 @@ public partial class AuthDialog : IDisposable
|
||||
_resendTimer?.Dispose();
|
||||
_resendTimer = null;
|
||||
}
|
||||
private string GetDialogTitle() => _currentStep == AuthStep.Phone ? "ورود به حساب کاربری" : "تأیید رمز پویا";
|
||||
private string GetDialogTitle() => _currentStep == AuthStep.Phone ? "ورود/ثبتنام به حساب کاربری" : "تأیید رمز پویا";
|
||||
}
|
||||
@@ -48,6 +48,7 @@ public partial class MainLayout
|
||||
if (!result.Canceled)
|
||||
{
|
||||
await CheckAuthStatus();
|
||||
Snackbar.Add(GlobalConstants.SuccessMsg, Severity.Success);
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user