Semplificaizone menù top

This commit is contained in:
Samuele Locatelli
2022-02-15 11:48:25 +01:00
parent b457ed905f
commit 599ff6aaba
+1 -20
View File
@@ -4,7 +4,6 @@
@using GWMS.UI.Data
@inject MessageService AppMessages
@inject AuthenticationStateProvider AuthenticationStateProvider
<div class="form-row pt-3">
<div class="col-7 col-md-6 col-lg-4 col-xl-3">
@@ -23,20 +22,17 @@
@code {
[CascadingParameter]
private Task<AuthenticationState> AuthenticationStateTask { get; set; }
[CascadingParameter(Name = "ShowSearch")]
private bool ShowSearch { get; set; }
private string userName = "";
private string PageName { get; set; }
private string PageIcon { get; set; }
protected override async Task OnInitializedAsync()
{
await forceReload();
await Task.Delay(0);
}
protected override void OnInitialized()
@@ -58,21 +54,6 @@
AppMessages.EA_PageUpdated -= OnPageUpdate;
}
private async Task forceReload()
{
var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync();
var user = authState.User;
if (user.Identity.IsAuthenticated)
{
userName = $"{user.Identity.Name}";
}
else
{
userName = "N.A.";
}
}
}
@* // Vedere anche: