@@ -119,7 +120,7 @@
void RemovePeer() {
try {
- _webService.RemoveWireguardModel(peer);
+ _webHelper.RemoveWireguardModel(peer);
AfterDelete?.Invoke();
}
catch (Exception e) {
diff --git a/Linguard/Web/Shared/ProfileMenu.razor b/Linguard/Web/Shared/ProfileMenu.razor
index 91ae931..01684da 100644
--- a/Linguard/Web/Shared/ProfileMenu.razor
+++ b/Linguard/Web/Shared/ProfileMenu.razor
@@ -1,11 +1,16 @@
@using Linguard.Core.Models
+@using System.Security.Claims
+@using Linguard.Web.Services
+@using Microsoft.AspNetCore.Authentication.Cookies
+@using Microsoft.AspNetCore.Identity
+@using Microsoft.Extensions.Options
-
+
@@ -13,23 +18,42 @@
-
+
+@inject ILogger _logger
+@inject AuthenticationStateProvider _authenticationStateProvider
@inject IJSRuntime _jsRuntime
+@inject IAuthenticationService _authenticationService
@code {
- string user = "admin";
- string? email;
- string GreetingMessage => $"Hi, {user}";
- string GravatarEmail => email ?? "user@example.com";
+ string? _user;
+ string? _email;
+ string GreetingMessage => $"Hi, {_user}";
+ string GravatarEmail => _email ?? "user@example.com";
async Task OnStyleChanged(string styleName) {
var style = Enum.Parse