@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? Errors { get; set; } [SupplyParameterFromQuery] string? ReturnUrl { get; set; } protected override void OnAfterRender(bool firstRender) { base.OnAfterRender(firstRender); if (firstRender) { if (!string.IsNullOrEmpty(Errors)) { NotificationService.Notify(new NotificationMessage() { Severity = NotificationSeverity.Error, Summary = "Ошибка", Detail = Errors, Duration = -1d }); } } } }