From b4b08d1c1acf7eb39b1c980a38dc04563d54be08 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 14 Dec 2023 16:07:17 +0100 Subject: [PATCH] ok sistema di refresh login post F5 --- MP-TAB-SERV/Components/CmpTop.razor.cs | 14 +++++++------- MP-TAB-SERV/Components/ScrapMan.razor | 2 +- MP-TAB-SERV/MP-TAB-SERV.csproj | 2 +- MP-TAB-SERV/Resources/ChangeLog.html | 2 +- MP-TAB-SERV/Resources/VersNum.txt | 2 +- MP-TAB-SERV/Resources/manifest.xml | 2 +- MP-TAB-SERV/Shared/MainLayout.razor | 4 ++-- MP-TAB-SERV/Shared/MainLayout.razor.cs | 7 +++++++ 8 files changed, 21 insertions(+), 14 deletions(-) diff --git a/MP-TAB-SERV/Components/CmpTop.razor.cs b/MP-TAB-SERV/Components/CmpTop.razor.cs index 8453c92b..08dfd29e 100644 --- a/MP-TAB-SERV/Components/CmpTop.razor.cs +++ b/MP-TAB-SERV/Components/CmpTop.razor.cs @@ -15,6 +15,8 @@ namespace MP_TAB_SERV.Components [Parameter] public List CurrMenuItems { get; set; } = new List(); + [Parameter] + public EventCallback EA_UserIsOk { get; set; } #endregion Public Properties @@ -125,7 +127,7 @@ namespace MP_TAB_SERV.Components int expDays = SMServ.GetConfInt("cookieDayExpire"); expDT = DateTime.Now.AddDays(expDays); var CurrDevGuid = await MsgServ.GetCurrDevGuidLSAsync(); - + //if (string.IsNullOrEmpty(CurrDevGuid.ToString())) if (CurrDevGuid == Guid.Empty) { @@ -144,13 +146,13 @@ namespace MP_TAB_SERV.Components if (!string.IsNullOrEmpty(decryptedData)) { var oprObj = JsonConvert.DeserializeObject(decryptedData); - if(oprObj != null) + if (oprObj != null) { MsgServ.RigaOper = oprObj.currOpr; } } } - + CurrOprTknRedis = await TDService.OperatoreGetRedis(MatrOpr, CurrDevGuid); @@ -164,10 +166,8 @@ namespace MP_TAB_SERV.Components } else if (!string.IsNullOrEmpty(CurrOprTknRedis) && CurrOprTknRedis == CurrOprTknLS) { - if (MsgServ.RigaOper == null) - { - await RefreshLogIn(decodedUrl); - } + await RefreshLogIn(decodedUrl); + await EA_UserIsOk.InvokeAsync(true); } } diff --git a/MP-TAB-SERV/Components/ScrapMan.razor b/MP-TAB-SERV/Components/ScrapMan.razor index ba4c722d..8b27c012 100644 --- a/MP-TAB-SERV/Components/ScrapMan.razor +++ b/MP-TAB-SERV/Components/ScrapMan.razor @@ -84,7 +84,7 @@ × @if (item.KitSplit) { - } diff --git a/MP-TAB-SERV/MP-TAB-SERV.csproj b/MP-TAB-SERV/MP-TAB-SERV.csproj index 44ab1251..a661d908 100644 --- a/MP-TAB-SERV/MP-TAB-SERV.csproj +++ b/MP-TAB-SERV/MP-TAB-SERV.csproj @@ -3,7 +3,7 @@ net6.0 enable - 6.16.2312.1414 + 6.16.2312.1416 enable MP_TAB_SERV diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html index c4b2ccc1..16d6d30f 100644 --- a/MP-TAB-SERV/Resources/ChangeLog.html +++ b/MP-TAB-SERV/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2312.1414

+

Versione: 6.16.2312.1416


Note di rilascio:
  • diff --git a/MP-TAB-SERV/Resources/VersNum.txt b/MP-TAB-SERV/Resources/VersNum.txt index e8a51188..4ed19b58 100644 --- a/MP-TAB-SERV/Resources/VersNum.txt +++ b/MP-TAB-SERV/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2312.1414 +6.16.2312.1416 diff --git a/MP-TAB-SERV/Resources/manifest.xml b/MP-TAB-SERV/Resources/manifest.xml index c52ac7f7..54d87b0d 100644 --- a/MP-TAB-SERV/Resources/manifest.xml +++ b/MP-TAB-SERV/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2312.1414 + 6.16.2312.1416 https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/MP-TAB-SERV.zip https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/ChangeLog.html false diff --git a/MP-TAB-SERV/Shared/MainLayout.razor b/MP-TAB-SERV/Shared/MainLayout.razor index df3d355f..13589b1e 100644 --- a/MP-TAB-SERV/Shared/MainLayout.razor +++ b/MP-TAB-SERV/Shared/MainLayout.razor @@ -6,8 +6,8 @@
    - - @if (MsgServ.RigaOper != null || NavMan.Uri.Contains("reg-new-device")) + + @if (userIsOk || NavMan.Uri.Contains("reg-new-device")) {
    diff --git a/MP-TAB-SERV/Shared/MainLayout.razor.cs b/MP-TAB-SERV/Shared/MainLayout.razor.cs index 2d993db9..c702c78c 100644 --- a/MP-TAB-SERV/Shared/MainLayout.razor.cs +++ b/MP-TAB-SERV/Shared/MainLayout.razor.cs @@ -169,6 +169,13 @@ namespace MP_TAB_SERV.Shared await Task.Delay(1); } + protected bool userIsOk { get; set; } = false; + protected async Task checkIfUserOk(bool isOk) + { + await Task.Delay(1); + userIsOk = isOk; + } + protected async Task ReloadMemStor() { // in primis svuoto...