From 3487cdcb58ca50703fc905a4adc9ebf9ff17c666 Mon Sep 17 00:00:00 2001 From: Andre Beging Date: Tue, 31 May 2022 16:13:38 +0200 Subject: [PATCH] Navbar reorder --- FoodsharingSiegen.Server/App.razor | 3 ++- .../Pages/Prospects.razor.cs | 9 +++---- FoodsharingSiegen.Server/Shared/NavMenu.razor | 24 ++++++++++++------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/FoodsharingSiegen.Server/App.razor b/FoodsharingSiegen.Server/App.razor index 4ff94fd..8bfd40b 100644 --- a/FoodsharingSiegen.Server/App.razor +++ b/FoodsharingSiegen.Server/App.razor @@ -12,9 +12,10 @@ + + - @code{ private Theme theme = new() diff --git a/FoodsharingSiegen.Server/Pages/Prospects.razor.cs b/FoodsharingSiegen.Server/Pages/Prospects.razor.cs index 842b58c..ebd4571 100644 --- a/FoodsharingSiegen.Server/Pages/Prospects.razor.cs +++ b/FoodsharingSiegen.Server/Pages/Prospects.razor.cs @@ -13,11 +13,6 @@ namespace FoodsharingSiegen.Server.Pages { #region Dependencies (Injected) - /// - /// Gets or sets the value of the message service (ab) - /// - [Inject] private IMessageService MessageService { get; set; } = null!; - /// /// Gets or sets the value of the prospect service (ab) /// @@ -151,7 +146,7 @@ namespace FoodsharingSiegen.Server.Pages /// The arg private async Task RemoveInteraction(Guid arg) { - var confirm = await MessageService.Confirm("Interaktion wirklich löschen?", "Bestätigen", o => { + var confirm = await Message.Confirm("Interaktion wirklich löschen?", "Bestätigen", o => { o.ConfirmButtonText = "Ja, wirklich!"; o.CancelButtonText = "Abbrechen"; o.ShowMessageIcon = false; @@ -162,6 +157,8 @@ namespace FoodsharingSiegen.Server.Pages await ProspectService.RemoveInteraction(arg); await LoadProspects(); } + + await InvokeAsync(StateHasChanged); } #endregion diff --git a/FoodsharingSiegen.Server/Shared/NavMenu.razor b/FoodsharingSiegen.Server/Shared/NavMenu.razor index 9cd612e..e26a1f0 100644 --- a/FoodsharingSiegen.Server/Shared/NavMenu.razor +++ b/FoodsharingSiegen.Server/Shared/NavMenu.razor @@ -1,9 +1,20 @@  \ No newline at end of file