ModalComponent Show und Close-Funktionsnamen normiert

This commit is contained in:
BuildTools committed 2024-06-26 20:37:49 +02:00
1 parent 1e79620272
commit 8ccbe8cf65
6 files changed
+12 -13

No files matched your search

+2 -2
View File
@@ -33,7 +33,7 @@
private string modalClass = "";
private bool showBackdrop = false;
public async Task OpenModal()
public async Task ShowAsync()
{
modalDisplay = "block;";
await Task.Delay(100);//Delay allows bootstrap to perform nice fade animation
@@ -41,7 +41,7 @@
showBackdrop = true;
}
public async Task Close()
public async Task CloseAsync()
{
modalDisplay = "none";
await Task.Delay(250);//Delay allows bootstrap to perform nice fade animation
+2 -3
View File
@@ -29,7 +29,6 @@
}
</tbody>
</table>
</div>
<ModalComponent @ref="modal">
@@ -67,13 +66,13 @@
private async Task ConfirmDelete(Cocktail c)
{
SelectedCocktail = c;
await modal.OpenModal();
await modal.ShowAsync();
}
private async Task CloseDialog()
{
SelectedCocktail = null;
await modal.Close();
await modal.CloseAsync();
}
private async Task DeleteCocktail(MouseEventArgs e)
{
+3 -3
View File
@@ -105,12 +105,12 @@
if (CocktailsWithIngredient.Count > 0)
{
InfoText = String.Join(", ", CocktailsWithIngredient.Select(c => c.Name).ToArray());
await dlgInfo.OpenModal();
await dlgInfo.ShowAsync();
}
else
{
SelectedIngredient = fl;
await dlgDelete.OpenModal();
await dlgDelete.ShowAsync();
}
}
@@ -133,6 +133,6 @@
private async Task CloseDialog(ModalComponent dlg)
{
SelectedIngredient = null;
await dlg.Close();
await dlg.CloseAsync();
}
}
+2 -2
View File
@@ -35,7 +35,7 @@ namespace CocktailWeb.Pages.Settings
{
SelectedFiller = f;
SelectedFlasche = f.Flasche;
await modal.OpenModal();
await modal.ShowAsync();
}
@@ -63,7 +63,7 @@ namespace CocktailWeb.Pages.Settings
{
SelectedFiller = null;
SelectedFlasche = null;
await modal.Close();
await modal.CloseAsync();
}
}
}