From b3376e290e45e397acd5c09d42b09e205b740974 Mon Sep 17 00:00:00 2001 From: Annamaria Sassi Date: Tue, 19 May 2026 09:10:52 +0200 Subject: [PATCH] Aggiunto componente per gruppi elementi della barra laterale --- Lux.API/Lux.API.csproj | 2 +- Lux.UI/Components/Layout/GroupElem.razor | 30 ++++++ Lux.UI/Components/Layout/GroupElem.razor.cs | 58 +++++++++++ Lux.UI/Components/Layout/GroupElem.razor.css | 51 ++++++++++ Lux.UI/Components/Layout/GroupElem.razor.less | 62 ++++++++++++ .../Components/Layout/GroupElem.razor.min.css | 1 + Lux.UI/Components/Layout/MainLayout.razor.css | 2 +- .../Components/Layout/MainLayout.razor.less | 2 +- .../Layout/MainLayout.razor.min.css | 2 +- Lux.UI/Components/Layout/NavMenu.razor | 98 +------------------ Lux.UI/Components/Layout/NavMenu.razor.cs | 37 ++++--- Lux.UI/Lux.UI.csproj | 2 +- Lux.UI/compilerconfig.json | 4 + Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 16 files changed, 241 insertions(+), 116 deletions(-) create mode 100644 Lux.UI/Components/Layout/GroupElem.razor create mode 100644 Lux.UI/Components/Layout/GroupElem.razor.cs create mode 100644 Lux.UI/Components/Layout/GroupElem.razor.css create mode 100644 Lux.UI/Components/Layout/GroupElem.razor.less create mode 100644 Lux.UI/Components/Layout/GroupElem.razor.min.css diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index aa0becf3..4c50e9ce 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 1.1.2605.1809 + 1.1.2605.1909 diff --git a/Lux.UI/Components/Layout/GroupElem.razor b/Lux.UI/Components/Layout/GroupElem.razor new file mode 100644 index 00000000..77beda3f --- /dev/null +++ b/Lux.UI/Components/Layout/GroupElem.razor @@ -0,0 +1,30 @@ + + +@if (isMenuOpen) +{ + foreach(var elem in subElement) + { + + } + @* *@ +} + diff --git a/Lux.UI/Components/Layout/GroupElem.razor.cs b/Lux.UI/Components/Layout/GroupElem.razor.cs new file mode 100644 index 00000000..59161f82 --- /dev/null +++ b/Lux.UI/Components/Layout/GroupElem.razor.cs @@ -0,0 +1,58 @@ + +using Microsoft.EntityFrameworkCore.Migrations.Operations; + +namespace Lux.UI.Components.Layout +{ + public partial class GroupElem + { + [Parameter] + public List NameList { get; set; } = new List(); + + [Parameter] + public List PageList { get; set; } = new List(); + + [Parameter] + public List IconList { get; set; } = new List(); + + [Parameter] + public bool ShowText { get; set; } = true; + + protected string hideText { get => ShowText ? "" : "invisible"; } + protected string subArtCss { get => ShowText ? "ps-5 pe-3" : "ps-5 pe-2"; } + + private bool isMenuOpen = false; + + public List subElement { get; set; } = new List(); + public List subIcon { get; set; } = new List(); + + private void Toggle() + { + isMenuOpen = !isMenuOpen; + UpdateData(); + } + + private void UpdateData() + { + subElement = new List(); + subIcon = new List(); + for(int i = 1; i - - @if (isArticoliOpen) - { - - - } - - @if (isCicloProdOpen) - { - - - } - @* - *@ - - @if (isContattiOpen) - { - - - } - @* *@ - @* *@ + + +