LANCommander/LANCommander.Launcher/UI/Components/ActionSelectorDialog.razor
2024-12-31 18:21:41 -06:00

20 lines
No EOL
568 B
Text

@using System.Diagnostics
@using LANCommander.Launcher.Data.Models
@using LANCommander.Launcher.Models
@inherits FeedbackComponent<ActionSelectorDialogOptions, Process>
@inject GameService GameService
<AntList DataSource="Options.Actions" TItem="SDK.Models.Action" Class="ant-list-clickable" Size="ListSize.Small">
<ListItem OnClick="() => Run(Options.Game, context)">
@context.Name
</ListItem>
</AntList>
@code {
void Run(Game game, SDK.Models.Action action)
{
GameService.Run(game, action);
CloseFeedbackAsync();
}
}