@using LANCommander.SDK.Models @inherits FeedbackComponent @inject SaveService SaveService @inject SDK.Client Client @inject IMessageService MessageService @context.LocalFileInfo?.CreationTime @context.LocalFileInfo?.LastWriteTime @if (context.LocalFileInfo?.Length > 0) { } @if (context.Length > 0) { }
@code { IEnumerable Conflicts = new List(); IEnumerable Selected = new List(); bool Loading = true; protected override async Task OnInitializedAsync() { await LoadData(); } async Task Close() { await CloseFeedbackAsync(); } async Task LoadData() { Conflicts = await Client.Games.ValidateFilesAsync(Options.InstallDirectory, Options.Id); Loading = false; } public override async Task OnFeedbackOkAsync(ModalClosingEventArgs args) { Loading = true; StateHasChanged(); await Task.Yield(); await Client.Games.DownloadFilesAsync(Options.InstallDirectory, Options.Id, Selected.Select(e => e.FullName)); Loading = false; StateHasChanged(); await Task.Yield(); await base.CloseFeedbackAsync(); } }