46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
@using MudBlazor
|
|
@using RobotNet10.RobotApp.Client.Shared.SLAM
|
|
|
|
<MudDialog>
|
|
<TitleContent>
|
|
<MudText Typo="Typo.h6">Select Map for Localization</MudText>
|
|
</TitleContent>
|
|
<DialogContent>
|
|
@if (Maps == null || Maps.Length == 0)
|
|
{
|
|
<MudText Typo="Typo.body1" Color="Color.Secondary">
|
|
No maps available. Please create a map first.
|
|
</MudText>
|
|
}
|
|
else
|
|
{
|
|
<MudList T="MapInfoDto">
|
|
@foreach (var map in Maps)
|
|
{
|
|
<MudListItem OnClick="@(() => SelectMap(map.Name))">
|
|
<MudText Typo="Typo.body1">@map.Name</MudText>
|
|
<MudText Typo="Typo.caption" Color="Color.Secondary">
|
|
Created: @map.CreatedDate.ToString("yyyy-MM-dd HH:mm:ss")
|
|
</MudText>
|
|
</MudListItem>
|
|
}
|
|
</MudList>
|
|
}
|
|
</DialogContent>
|
|
<DialogActions>
|
|
<MudButton OnClick="Cancel">Cancel</MudButton>
|
|
</DialogActions>
|
|
</MudDialog>
|
|
|
|
@code {
|
|
[CascadingParameter] IMudDialogInstance Dialog { get; set; } = null!;
|
|
[Parameter] public MapInfoDto[] Maps { get; set; } = Array.Empty<MapInfoDto>();
|
|
|
|
private void Cancel() => Dialog.Cancel();
|
|
|
|
private void SelectMap(string mapName)
|
|
{
|
|
Dialog.Close(DialogResult.Ok(mapName));
|
|
}
|
|
}
|