From 0032648e767e93951e940a9e3097dc7de4baabca Mon Sep 17 00:00:00 2001 From: MarcoE Date: Thu, 12 Jun 2025 12:57:34 +0200 Subject: [PATCH] Rivista UI --- Template.Maui/App.xaml | 3 +- Template.Maui/MauiProgram.cs | 2 + Template.Maui/wwwroot/index.html | 4 +- .../Components/Layout/HeaderLayout.razor | 12 +- .../Components/Layout/MainLayout.razor | 2 +- .../Components/Layout/NavMenu.razor | 33 ++- .../Components/Layout/NavMenu.razor.css | 36 +++- .../Components/Pages/ActivityForm.razor | 196 ++++++++---------- .../Components/Pages/ActivityForm.razor.css | 11 + .../Components/Pages/Calendar.razor | 27 ++- .../Components/Pages/Calendar.razor.css | 14 +- .../Components/Pages/PersonalInfo.razor | 167 +++++++++------ .../Components/Pages/PersonalInfo.razor.css | 90 +++++--- .../Components/Pages/Settings.razor | 35 +--- .../SingleElements/Card/ActivityCard.razor | 11 +- .../Card/ActivityCard.razor.css | 2 +- Template.Shared/Core/Helpers/ModalHelpers.cs | 22 ++ Template.Shared/Template.Shared.csproj | 25 +-- Template.Shared/_Imports.razor | 1 + Template.Shared/wwwroot/css/app.css | 5 + Template.Shared/wwwroot/css/default-theme.css | 3 +- Template.Shared/wwwroot/js/calendar.js | 33 ++- 22 files changed, 437 insertions(+), 297 deletions(-) create mode 100644 Template.Shared/Core/Helpers/ModalHelpers.cs diff --git a/Template.Maui/App.xaml b/Template.Maui/App.xaml index 500235a..4430642 100644 --- a/Template.Maui/App.xaml +++ b/Template.Maui/App.xaml @@ -1,7 +1,8 @@ diff --git a/Template.Maui/MauiProgram.cs b/Template.Maui/MauiProgram.cs index d1607c6..a8d4cbf 100644 --- a/Template.Maui/MauiProgram.cs +++ b/Template.Maui/MauiProgram.cs @@ -3,6 +3,7 @@ using IntegryApiClient.MAUI; using Microsoft.AspNetCore.Components.Authorization; using Microsoft.Extensions.Logging; using MudBlazor.Services; +using MudExtensions.Services; using Template.Maui.Core.Services; using Template.Shared; using Template.Shared.Core.Helpers; @@ -32,6 +33,7 @@ namespace Template.Maui builder.Services.AddMauiBlazorWebView(); builder.Services.AddMudServices(); + builder.Services.AddMudExtensions(); builder.Services.AddAutoMapper(typeof(MappingProfile)); diff --git a/Template.Maui/wwwroot/index.html b/Template.Maui/wwwroot/index.html index 5ff5179..16ae979 100644 --- a/Template.Maui/wwwroot/index.html +++ b/Template.Maui/wwwroot/index.html @@ -9,10 +9,11 @@ - + + @@ -42,6 +43,7 @@ + diff --git a/Template.Shared/Components/Layout/HeaderLayout.razor b/Template.Shared/Components/Layout/HeaderLayout.razor index f75ccff..14135f6 100644 --- a/Template.Shared/Components/Layout/HeaderLayout.razor +++ b/Template.Shared/Components/Layout/HeaderLayout.razor @@ -1,6 +1,6 @@ @inject IJSRuntime JS -
+
@if (Back) { @@ -26,7 +26,7 @@ } @if (ShowNotifications) { - + @* *@ } @if (ShowCalendarToggle) { @@ -54,6 +54,7 @@ [Parameter] public string BackTo { 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; } @@ -68,7 +69,14 @@ private async Task GoBack() { + if (Cancel) + { + await OnCancel.InvokeAsync(); + return; + } + await JS.InvokeVoidAsync("goBack"); + } } \ No newline at end of file diff --git a/Template.Shared/Components/Layout/MainLayout.razor b/Template.Shared/Components/Layout/MainLayout.razor index a13cd6e..65aa5d8 100644 --- a/Template.Shared/Components/Layout/MainLayout.razor +++ b/Template.Shared/Components/Layout/MainLayout.razor @@ -12,7 +12,7 @@
-
+
@Body
diff --git a/Template.Shared/Components/Layout/NavMenu.razor b/Template.Shared/Components/Layout/NavMenu.razor index ec8366a..ac1d1b0 100644 --- a/Template.Shared/Components/Layout/NavMenu.razor +++ b/Template.Shared/Components/Layout/NavMenu.razor @@ -1,14 +1,16 @@ +@inject IDialogService Dialog + @if (IsVisible) {