18 lines
1 KiB
Text
18 lines
1 KiB
Text
@inherits FeedbackComponent<FilePickerOptions, IEnumerable<IFileManagerEntry>>
|
|
@using System.IO.Compression;
|
|
@using LANCommander.Server.Models;
|
|
|
|
<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.Breadcrumbs)" />
|
|
|
|
@code {
|
|
private FileManagerDirectory CurrentPath { get; set; }
|
|
private IEnumerable<IFileManagerEntry> SelectedFiles { get; set; }
|
|
|
|
public override async Task OnFeedbackOkAsync(ModalClosingEventArgs args)
|
|
{
|
|
if (SelectedFiles == null || SelectedFiles.Count() == 0)
|
|
await base.OkCancelRefWithResult!.OnOk(new List<IFileManagerEntry>() { CurrentPath });
|
|
else
|
|
await base.OkCancelRefWithResult!.OnOk(SelectedFiles);
|
|
}
|
|
}
|