Merge branch 'develop' of https://gitlab.steamware.net/steamware/mapo-core into develop
This commit is contained in:
@@ -42,7 +42,7 @@ namespace MP_TAB_SERV.Pages
|
||||
await localStorage.SetItemAsync("currTkn", "");
|
||||
await TDService.OperatoreDeleteRedis(MsgServ.MatrOpr);
|
||||
MsgServ.RigaOper = null;
|
||||
NavMan.NavigateTo("reg-new-device");
|
||||
NavMan.NavigateTo("reg-new-device", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,7 +72,10 @@ namespace MP_TAB_SERV.Shared
|
||||
protected async Task handleBodyClick()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
await checkDtDiff2Logout();
|
||||
if (!NavMan.Uri.Contains("reg-new-device"))
|
||||
{
|
||||
await checkDtDiff2Logout();
|
||||
}
|
||||
|
||||
}
|
||||
private int MatrOpr
|
||||
@@ -94,7 +97,7 @@ namespace MP_TAB_SERV.Shared
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if ((diffOfTime.Minutes >= dtScadLogin) && (!NavMan.Uri.Contains("reg-new-device")))
|
||||
if (diffOfTime.Minutes >= dtScadLogin)
|
||||
{
|
||||
var userTkn = await TDataService.OperatoreGetRedis(MatrOpr);
|
||||
if (!string.IsNullOrEmpty(userTkn))
|
||||
|
||||
@@ -14,9 +14,18 @@
|
||||
foreach (var item in MenuItems)
|
||||
{
|
||||
<div class="nav-item px-2">
|
||||
<NavLink class="nav-link px-2" @onclick="()=>SetPage(item.NavigateUrl)">
|
||||
<i class="fa fa-lg @item.icona pe-2" aria-hidden="true"></i> @item.Testo
|
||||
</NavLink>
|
||||
@if (@linkActive(item.NavigateUrl))
|
||||
{
|
||||
<NavLink class="nav-link px-2 active" @onclick="()=>SetPage(item.NavigateUrl)">
|
||||
<i class="fa fa-lg @item.icona pe-2" aria-hidden="true"></i> @item.Testo
|
||||
</NavLink>
|
||||
}
|
||||
else
|
||||
{
|
||||
<NavLink class="nav-link px-2" @onclick="()=>SetPage(item.NavigateUrl)">
|
||||
<i class="fa fa-lg @item.icona pe-2" aria-hidden="true"></i> @item.Testo
|
||||
</NavLink>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}
|
||||
@@ -34,6 +43,16 @@
|
||||
[Inject]
|
||||
protected NavigationManager navManager { get; set; } = null!;
|
||||
|
||||
protected bool linkActive(string objUrl)
|
||||
{
|
||||
bool answ = false;
|
||||
if (navManager.Uri.Contains(objUrl))
|
||||
{
|
||||
answ = true;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected async Task SetPage(string tgtUrl)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
|
||||
Reference in New Issue
Block a user