@page "/PersonalInfo" @attribute [Authorize] @using Template.Shared.Components.Layout @using Template.Shared.Core.Authorization.Enum @using Template.Shared.Core.Interface @using Template.Shared.Core.Services @using Template.Shared.Core.Utility @inject AppAuthenticationStateProvider AuthenticationStateProvider @inject INetworkService NetworkService @inject IFormFactor FormFactor
@UserSession.User.Fullname @if (UserSession.User.KeyGroup is not null) { @(((KeyGroupEnum)UserSession.User.KeyGroup).ConvertToHumanReadable()) }
Impostazioni
Esci
@code { private bool Unavailable { get; set; } private DateTime LastSync { get; set; } protected override async Task OnInitializedAsync() { await LoadData(); } private async Task LoadData() { await Task.Run(() => { Unavailable = FormFactor.IsWeb() || !NetworkService.IsNetworkAvailable(); LastSync = LocalStorage.Get("last-sync"); }); StateHasChanged(); } private void OpenSettings() => NavigationManager.NavigateTo("/settings/Profilo"); private void Logout() => AuthenticationStateProvider.SignOut(); }