From cdd12bf7643aa4b48b08ab7d8034ce8929afc316 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 20 Sep 2021 13:15:17 +0200 Subject: [PATCH] Fix grafico pagina elenco --- MP.Land/MP.Land.csproj | 2 +- MP.Land/Pages/Index.razor | 66 +++++++++++++++++++++++--------- MP.Land/Pages/Index.razor.cs | 7 ++++ MP.Land/Resources/ChangeLog.html | 2 +- MP.Land/Resources/VersNum.txt | 2 +- MP.Land/Resources/manifest.xml | 2 +- 6 files changed, 58 insertions(+), 23 deletions(-) diff --git a/MP.Land/MP.Land.csproj b/MP.Land/MP.Land.csproj index 961819b4..4aedca16 100644 --- a/MP.Land/MP.Land.csproj +++ b/MP.Land/MP.Land.csproj @@ -3,7 +3,7 @@ net5.0 MP.Land - 1.1.2109.2012 + 1.1.2109.2013 diff --git a/MP.Land/Pages/Index.razor b/MP.Land/Pages/Index.razor index aa3e8ea1..3dbc283d 100644 --- a/MP.Land/Pages/Index.razor +++ b/MP.Land/Pages/Index.razor @@ -41,29 +41,57 @@
- -

@item.AppName 

-
+ @if (authOk(item)) + { + +

@item.AppName 

+
+ } + else + { + +

@item.AppName

+
+ }
-
+
-
- -
-
- @(traduci($"{item.AppName}-TITLE")) -
    - @(traduci($"{item.AppName}-LIST")) -
-
+ @if (authOk(item)) + { +
+ +
+
+ @(traduci($"{item.AppName}-TITLE")) +
    + @(traduci($"{item.AppName}-LIST")) +
+
+ } + else + { +
+ +
+
+ @(traduci($"{item.AppName}-TITLE")) +
    + @(traduci($"{item.AppName}-LIST")) +
+
+ }
- @if (string.IsNullOrEmpty(item.LicenseKey)) - { - - } +
} diff --git a/MP.Land/Pages/Index.razor.cs b/MP.Land/Pages/Index.razor.cs index 1889435e..eddd4477 100644 --- a/MP.Land/Pages/Index.razor.cs +++ b/MP.Land/Pages/Index.razor.cs @@ -6,6 +6,7 @@ using MP.Land.Data; using MP.Land.Components; using Microsoft.AspNetCore.Components; using Microsoft.Extensions.Configuration; +using MP.AppAuth.Models; namespace MP.Land.Pages { @@ -44,6 +45,12 @@ namespace MP.Land.Pages #region Protected Methods + protected bool authOk(UpdMan currItem) + { + bool answ = !string.IsNullOrEmpty(currItem.LicenseKey) && Convert.ToBoolean(currItem.IsAuth); + return answ; + } + protected string fullUrl(string relUrl) { return $"{Configuration["BaseUrl"]}{relUrl}"; diff --git a/MP.Land/Resources/ChangeLog.html b/MP.Land/Resources/ChangeLog.html index beeab3e2..4e1f5932 100644 --- a/MP.Land/Resources/ChangeLog.html +++ b/MP.Land/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo gestione Programmi MAPO -

Versione: 1.1.2109.2012

+

Versione: 1.1.2109.2013


Note di rilascio:
    diff --git a/MP.Land/Resources/VersNum.txt b/MP.Land/Resources/VersNum.txt index 223aaeef..2029b9ac 100644 --- a/MP.Land/Resources/VersNum.txt +++ b/MP.Land/Resources/VersNum.txt @@ -1 +1 @@ -1.1.2109.2012 +1.1.2109.2013 diff --git a/MP.Land/Resources/manifest.xml b/MP.Land/Resources/manifest.xml index e0a371ae..f30be695 100644 --- a/MP.Land/Resources/manifest.xml +++ b/MP.Land/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.1.2109.2012 + 1.1.2109.2013 https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/MP.Land.zip https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/ChangeLog.html false