LANCommander/LANCommander.Client/UI/Components/ActionSelectorDialog.razor
2024-05-25 22:21:04 -05:00

19 lines
No EOL
534 B
Text

@using System.Diagnostics
@using LANCommander.Client.Models
@inherits FeedbackComponent<ActionSelectorDialogOptions, Process>
@inject LibraryService LibraryService
<AntList DataSource="Options.Actions" TItem="SDK.Models.Action" Size="small">
<ListItem OnClick="() => Run(Options.LibraryItem, context)">
@context.Name
</ListItem>
</AntList>
@code {
void Run(LibraryItem libraryItem, SDK.Models.Action action)
{
LibraryService.Run(Options.LibraryItem, action);
CloseFeedbackAsync();
}
}