Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore multiple entries at once #227

Merged
merged 2 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BLAZAM/BLAZAM.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<ServerGarbageCollection>false</ServerGarbageCollection>
<AssemblyVersion>0.8.8</AssemblyVersion>
<Version>2024.02.13.2246</Version>
<Version>2024.02.13.2312</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<RootNamespace>BLAZAM</RootNamespace>
<GenerateDocumentationFile>False</GenerateDocumentationFile>
Expand Down
23 changes: 19 additions & 4 deletions BLAZAM/Pages/Recycle Bin/RecycleBin.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
<AppPageTitle>Recycle Bin</AppPageTitle>

<MudDataGrid T="IDirectoryEntryAdapter"
Virtualize
Virtualize=true
ColumnResizeMode="ResizeMode.Container"
Class=""
Hideable
Square
Hideable=true
@bind-SelectedItems=@selectedEntries
Square=true
MultiSelection=true
Items="@deletedObjects"
Filterable="false"
SortMode="@SortMode.Multiple"
Expand Down Expand Up @@ -51,7 +53,7 @@




HashSet<IDirectoryEntryAdapter> selectedEntries = new();



Expand Down Expand Up @@ -88,8 +90,21 @@

}
}
//TODO stop the confimation message on batch restore
async Task RestoreSelected()
{
IJob batchRestore = new Job(AppLocalization["Restore"]);
foreach (var entry in selectedEntries)
{
IJobStep restoreEntryStep = new JobStep(AppLocalization["Restore: "] + entry.CanonicalName, async (step) =>
{
await Restore(entry);
return true;

});
batchRestore.Steps.Add(restoreEntryStep);
}
batchRestore.Run();
batchRestore.ShowJobDetailsDialog(MessageService);
}
}
Loading