From d8bef12f302261f9f5a9b34f0d91a90a3dda49ac Mon Sep 17 00:00:00 2001 From: MarcoE Date: Fri, 6 Feb 2026 18:08:40 +0100 Subject: [PATCH] Creata pagina "user" --- SteUp.Maui/wwwroot/index.html | 1 + .../Components/Layout/HeaderLayout.razor | 79 ++++++++ .../Components/Layout/HeaderLayout.razor.css | 31 ++++ SteUp.Shared/Components/Layout/NavMenu.razor | 41 ++--- SteUp.Shared/Components/Pages/Home.razor | 4 - SteUp.Shared/Components/Pages/Index.razor | 2 +- SteUp.Shared/Components/Pages/Ispezioni.razor | 9 + .../{Home.razor.css => Ispezioni.razor.css} | 0 SteUp.Shared/Components/Pages/User.razor | 115 ++++++++++++ SteUp.Shared/Components/Pages/User.razor.css | 83 +++++++++ .../SingleElements/AppVersion.razor | 22 +++ .../SingleElements/AppVersion.razor.css | 11 ++ .../Core/Authorization/Enum/KeyGroupEnum.cs | 4 + SteUp.Shared/Core/Helpers/KeyGroupHelper.cs | 26 +++ SteUp.Shared/Core/Helpers/ObjectExtensions.cs | 18 ++ SteUp.Shared/Core/Utility/UtilityString.cs | 22 +++ SteUp.Shared/wwwroot/css/form.css | 170 ++++++++++++++++++ SteUp.Shared/wwwroot/js/main.js | 47 +++++ 18 files changed, 660 insertions(+), 25 deletions(-) create mode 100644 SteUp.Shared/Components/Layout/HeaderLayout.razor create mode 100644 SteUp.Shared/Components/Layout/HeaderLayout.razor.css delete mode 100644 SteUp.Shared/Components/Pages/Home.razor create mode 100644 SteUp.Shared/Components/Pages/Ispezioni.razor rename SteUp.Shared/Components/Pages/{Home.razor.css => Ispezioni.razor.css} (100%) create mode 100644 SteUp.Shared/Components/Pages/User.razor create mode 100644 SteUp.Shared/Components/Pages/User.razor.css create mode 100644 SteUp.Shared/Components/SingleElements/AppVersion.razor create mode 100644 SteUp.Shared/Components/SingleElements/AppVersion.razor.css create mode 100644 SteUp.Shared/Core/Helpers/KeyGroupHelper.cs create mode 100644 SteUp.Shared/Core/Helpers/ObjectExtensions.cs create mode 100644 SteUp.Shared/Core/Utility/UtilityString.cs create mode 100644 SteUp.Shared/wwwroot/css/form.css create mode 100644 SteUp.Shared/wwwroot/js/main.js diff --git a/SteUp.Maui/wwwroot/index.html b/SteUp.Maui/wwwroot/index.html index f60d2e2..af42dc4 100644 --- a/SteUp.Maui/wwwroot/index.html +++ b/SteUp.Maui/wwwroot/index.html @@ -18,6 +18,7 @@ + diff --git a/SteUp.Shared/Components/Layout/HeaderLayout.razor b/SteUp.Shared/Components/Layout/HeaderLayout.razor new file mode 100644 index 0000000..c8cc29f --- /dev/null +++ b/SteUp.Shared/Components/Layout/HeaderLayout.razor @@ -0,0 +1,79 @@ +@using SteUp.Shared.Core.Helpers +@inject IJSRuntime Js + +
+
+ @if (!SmallHeader) + { + if (Back) + { +
+ + @BackTo + +
+ } + +

@Title

+ +
+ @if (!LabelSave.IsNullOrEmpty()) + { + + @LabelSave + + } +
+ } + else + { +
+ + @Title + + +
+ } +
+
+ +@code{ + [Parameter] public string? Title { get; set; } + [Parameter] public bool Back { get; set; } + [Parameter] public bool BackOnTop { get; set; } + [Parameter] public string BackTo { get; set; } = ""; + + [Parameter] public EventCallback OnFilterToggle { get; set; } + + [Parameter] public bool Cancel { get; set; } + [Parameter] public EventCallback OnCancel { get; set; } + [Parameter] public string? LabelSave { get; set; } + [Parameter] public EventCallback OnSave { get; set; } + + [Parameter] public bool SmallHeader { get; set; } + + protected override void OnParametersSet() + { + Back = !Back ? !Back && Cancel : Back; + BackTo = Cancel ? "Annulla" : BackTo; + } + + private async Task GoBack() + { + if (Cancel) + { + await OnCancel.InvokeAsync(); + return; + } + + await Js.InvokeVoidAsync("goBack"); + } + +} \ No newline at end of file diff --git a/SteUp.Shared/Components/Layout/HeaderLayout.razor.css b/SteUp.Shared/Components/Layout/HeaderLayout.razor.css new file mode 100644 index 0000000..0cfbb55 --- /dev/null +++ b/SteUp.Shared/Components/Layout/HeaderLayout.razor.css @@ -0,0 +1,31 @@ +.header { + min-height: var(--mh-header); + width: 100%; + display: flex; + align-items: center; +} + +.header-content { + width: 100%; + line-height: normal; + display: flex; + justify-content: space-between; + align-items: center; + position: relative; +} + +.header-content > .title { width: 100%; } + +.header-content.with-back .page-title { + position: absolute; + left: 50%; + transform: translateX(-50%); + margin: 0; + font-size: larger; +} + +.left-section ::deep button, .right-section ::deep button { font-size: 1.1rem; } + +.left-section ::deep .mud-button-icon-start { margin-right: 3px !important; } + +.header-content.no-back .page-title { margin: 0; } \ No newline at end of file diff --git a/SteUp.Shared/Components/Layout/NavMenu.razor b/SteUp.Shared/Components/Layout/NavMenu.razor index 174c966..a71337d 100644 --- a/SteUp.Shared/Components/Layout/NavMenu.razor +++ b/SteUp.Shared/Components/Layout/NavMenu.razor @@ -1,28 +1,23 @@ +@using SteUp.Shared.Core.Interface.System.Network +@inject INetworkService NetworkService +