@inject IAuthService AuthService @inject IApplicationConfig AppConfig @inject IDataService DataService
@code { private RemotelyUser _user; private bool collapseNavMenu = true; private Dictionary _remoteControlAttributes = new() { ["target"] = "blank", ["href"] = "/RemoteControl" }; private string NavMenuCssClass => collapseNavMenu ? "collapse" : null; protected override async Task OnInitializedAsync() { if (AuthService.IsAuthenticated) { _user = DataService.GetUserByNameWithOrg(AuthService.Principal.Identity.Name); } await base.OnInitializedAsync(); } private void ToggleNavMenu() { collapseNavMenu = !collapseNavMenu; } }