@page "/account/register"
@inject NotificationService NotificationService
Регистрация аккаунта
Регистрация
@code {
sealed class InputModel
{
public string UserName { get; set; } = "";
public string Password { get; set; } = "";
public string ConfirmPassword { get; set; } = "";
}
[SupplyParameterFromForm]
InputModel Input { get; set; } = new();
[SupplyParameterFromQuery]
string? Error { get; set; }
[SupplyParameterFromQuery]
string? ReturnUrl { get; set; }
protected override void OnAfterRender(bool firstRender)
{
base.OnAfterRender(firstRender);
if (firstRender)
{
if (!string.IsNullOrEmpty(Error))
{
NotificationService.Notify(new NotificationMessage()
{
Severity = NotificationSeverity.Error,
Summary = "Ошибка",
Detail = Error,
Duration = -1d
});
}
}
}
}