From 8bbea17a2d19996bf83d63122497d5c973bee4ff Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Mon, 20 Jan 2025 12:51:19 -0500 Subject: [PATCH] Update MudBlazor --- Pkmds.Web/Components/Dialogs/ConfirmActionDialog.razor.cs | 2 +- Pkmds.Web/Components/Dialogs/ShowdownExportDialog.razor.cs | 2 +- Pkmds.Web/Components/EditForms/PokemonEditForm.razor.cs | 6 +++--- Pkmds.Web/Components/FileUploadDialog.razor.cs | 2 +- Pkmds.Web/Components/PartyGrid.razor.cs | 2 +- Pkmds.Web/Pkmds.Web.csproj | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Pkmds.Web/Components/Dialogs/ConfirmActionDialog.razor.cs b/Pkmds.Web/Components/Dialogs/ConfirmActionDialog.razor.cs index cc0abf34..8fb03d03 100644 --- a/Pkmds.Web/Components/Dialogs/ConfirmActionDialog.razor.cs +++ b/Pkmds.Web/Components/Dialogs/ConfirmActionDialog.razor.cs @@ -2,7 +2,7 @@ namespace Pkmds.Web.Components.Dialogs; public partial class ConfirmActionDialog { - [CascadingParameter] private MudDialogInstance? MudDialog { get; set; } + [CascadingParameter] private IMudDialogInstance? MudDialog { get; set; } [Parameter] public string Title { get; set; } = "Confirm Action"; diff --git a/Pkmds.Web/Components/Dialogs/ShowdownExportDialog.razor.cs b/Pkmds.Web/Components/Dialogs/ShowdownExportDialog.razor.cs index 3ab6420f..a9543480 100644 --- a/Pkmds.Web/Components/Dialogs/ShowdownExportDialog.razor.cs +++ b/Pkmds.Web/Components/Dialogs/ShowdownExportDialog.razor.cs @@ -4,7 +4,7 @@ public partial class ShowdownExportDialog { [Parameter] public PKM? Pokemon { get; set; } - [CascadingParameter] private MudDialogInstance? MudDialog { get; set; } + [CascadingParameter] private IMudDialogInstance? MudDialog { get; set; } private string ShowdownExport => Pokemon is not null ? AppService.ExportPokemonAsShowdown(Pokemon) diff --git a/Pkmds.Web/Components/EditForms/PokemonEditForm.razor.cs b/Pkmds.Web/Components/EditForms/PokemonEditForm.razor.cs index c0e6ea24..905fa74f 100644 --- a/Pkmds.Web/Components/EditForms/PokemonEditForm.razor.cs +++ b/Pkmds.Web/Components/EditForms/PokemonEditForm.razor.cs @@ -11,7 +11,7 @@ public void Dispose() => RefreshService.OnAppStateChanged -= StateHasChanged; private void ExportAsShowdown() => - DialogService.Show( + DialogService.ShowAsync( "Showdown Export", new() { { nameof(ShowdownExportDialog.Pokemon), Pokemon } }, new() { CloseOnEscapeKey = true, }); @@ -31,7 +31,7 @@ private void DeletePokemon() { nameof(ConfirmActionDialog.OnConfirm), EventCallback.Factory.Create(this, OnDeleteConfirm) } }; - DialogService.Show( + DialogService.ShowAsync( "Confirm Action", parameters, new() { CloseOnEscapeKey = true, MaxWidth = MaxWidth.Small, }); @@ -100,7 +100,7 @@ void ShowPasteConfirmation() { nameof(ConfirmActionDialog.OnConfirm), EventCallback.Factory.Create(this, OnPasteConfirm) } }; - DialogService.Show( + DialogService.ShowAsync( "Confirm Action", parameters, new() { CloseOnEscapeKey = true, MaxWidth = MaxWidth.Small, }); diff --git a/Pkmds.Web/Components/FileUploadDialog.razor.cs b/Pkmds.Web/Components/FileUploadDialog.razor.cs index abfa961c..24b043e4 100644 --- a/Pkmds.Web/Components/FileUploadDialog.razor.cs +++ b/Pkmds.Web/Components/FileUploadDialog.razor.cs @@ -2,7 +2,7 @@ namespace Pkmds.Web.Components; public partial class FileUploadDialog { - [CascadingParameter] private MudDialogInstance MudDialog { get; set; } = null!; + [CascadingParameter] private IMudDialogInstance MudDialog { get; set; } = null!; [Parameter] public string Message { get; set; } = "Choose a file to upload."; diff --git a/Pkmds.Web/Components/PartyGrid.razor.cs b/Pkmds.Web/Components/PartyGrid.razor.cs index 74b5ea2f..41536838 100644 --- a/Pkmds.Web/Components/PartyGrid.razor.cs +++ b/Pkmds.Web/Components/PartyGrid.razor.cs @@ -22,7 +22,7 @@ public void Dispose() } private void ExportAsShowdown() => - DialogService.Show( + DialogService.ShowAsync( "Showdown Export", new DialogOptions { CloseOnEscapeKey = true }); } diff --git a/Pkmds.Web/Pkmds.Web.csproj b/Pkmds.Web/Pkmds.Web.csproj index 57241fdb..0300e940 100644 --- a/Pkmds.Web/Pkmds.Web.csproj +++ b/Pkmds.Web/Pkmds.Web.csproj @@ -28,7 +28,7 @@ - +