2023-09-11 17:56:23 -05:00
|
|
|
@inherits FeedbackComponent<FilePickerOptions, IEnumerable<IFileManagerEntry>>
|
2023-09-11 01:56:50 -05:00
|
|
|
@using System.IO.Compression;
|
2024-08-04 18:44:33 -05:00
|
|
|
@using LANCommander.Server.Models;
|
2023-09-11 01:56:50 -05:00
|
|
|
|
2026-05-28 19:54:33 -05:00
|
|
|
<FileManager ArchiveId="@Options.ArchiveId" WorkingDirectory="@Options.Root" @bind-CurrentPath="CurrentPath" @bind-Selected="SelectedFiles" EntrySelectable="Options.EntrySelectable" EntryVisible="Options.EntryVisible" SelectMultiple="Options.Multiple" Features="@(FileManagerFeatures.NavigationBack | FileManagerFeatures.NavigationForward | FileManagerFeatures.UpALevel | FileManagerFeatures.Refresh | FileManagerFeatures.Breadcrumbs)" />
|
2023-09-11 01:56:50 -05:00
|
|
|
|
|
|
|
|
@code {
|
2023-12-21 17:21:55 -06:00
|
|
|
private FileManagerDirectory CurrentPath { get; set; }
|
2023-09-11 01:56:50 -05:00
|
|
|
private IEnumerable<IFileManagerEntry> SelectedFiles { get; set; }
|
|
|
|
|
|
|
|
|
|
public override async Task OnFeedbackOkAsync(ModalClosingEventArgs args)
|
|
|
|
|
{
|
2023-12-21 17:21:55 -06:00
|
|
|
if (SelectedFiles == null || SelectedFiles.Count() == 0)
|
|
|
|
|
await base.OkCancelRefWithResult!.OnOk(new List<IFileManagerEntry>() { CurrentPath });
|
|
|
|
|
else
|
|
|
|
|
await base.OkCancelRefWithResult!.OnOk(SelectedFiles);
|
2023-09-11 01:56:50 -05:00
|
|
|
}
|
|
|
|
|
}
|