1
0
mirror of synced 2024-11-30 17:24:33 +01:00
TaikoLocalServer/TaikoWebUI/Pages/Cards.razor.cs

33 lines
779 B
C#
Raw Normal View History

2023-09-09 14:58:20 +02:00
using TaikoWebUI.Pages.Dialogs;
namespace TaikoWebUI.Pages;
public partial class Cards
{
private DashboardResponse? response;
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
response = await Client.GetFromJsonAsync<DashboardResponse>("api/Dashboard");
}
private async Task DeleteCard(User user)
{
var parameters = new DialogParameters
{
["user"] = user
};
var dialog = DialogService.Show<CardDeleteConfirmDialog>("Delete Card", parameters);
var result = await dialog.Result;
if (result.Cancelled)
{
return;
}
response = await Client.GetFromJsonAsync<DashboardResponse>("api/Dashboard");
}
}