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