initial upload

This commit is contained in:
kkb 2023-09-21 18:58:32 +02:00
parent a0aa9cc28e
commit f857f43df4
553 changed files with 46169 additions and 13 deletions

View file

@ -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);
}
}