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) {