@inherits LayoutComponentBase @using System.Security.Claims; @using LANCommander.Server.Settings @inject AuthenticationStateProvider AuthenticationStateProvider @inject SettingsProvider SettingsProvider @if (User?.Identity?.IsAuthenticated ?? false) { @User?.Identity.Name General @if (SettingsProvider.CurrentValue.Server.Library.EnableUserLibraries) { Library } Connected Accounts Change Password Saves Logout } Dashboards Overview Average Session Playtime @if (User != null && User.IsInRole(RoleService.AdministratorRoleName)) { Games Metadata Collections Companies Engines Genres Platforms Tags Redistributables Tools Servers Scripting Snippets Modules Pages Edit View Issues Files Settings General Database Users Roles Authentication Appearance User Saves Library Archives Media Scripts IPX Relay Servers Beacon Tools Logs Launcher Updates HQ IGDB Steam SteamGridDB API } else { Pages } @code { ClaimsPrincipal User; protected override async Task OnInitializedAsync() { var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync(); if (authState.User.Identity.IsAuthenticated) User = authState.User; } }