initial upload
This commit is contained in:
parent
a0aa9cc28e
commit
f857f43df4
553 changed files with 46169 additions and 13 deletions
|
|
@ -0,0 +1,30 @@
|
|||
using Insight.Infrastructure.Entities;
|
||||
using Insight.Web.Constants;
|
||||
using Insight.Web.Middleware;
|
||||
using Insight.Web.Models.Account;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MudBlazor;
|
||||
|
||||
namespace Insight.Web.Pages.Account;
|
||||
|
||||
public partial class ProfilePasswordDialog
|
||||
{
|
||||
[CascadingParameter(Name = "User")] public InsightUser? User { get; set; }
|
||||
|
||||
[Inject] private NavigationManager NavigationManager { get; init; } = default!;
|
||||
[Inject] private ISnackbar Snackbar { get; init; } = default!;
|
||||
|
||||
private void Submit(ChangePasswordModel model)
|
||||
{
|
||||
if (model.NewPassword != model.ConfirmNewPassword)
|
||||
{
|
||||
Notification.Error(Snackbar, "Passwords not matching");
|
||||
return;
|
||||
}
|
||||
|
||||
var key = Guid.NewGuid();
|
||||
IdentityMiddleware.Passwords[key] = model;
|
||||
|
||||
NavigationManager.NavigateTo(Navigation.Account.ChangePasswordHref(key), true);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue