2025-12-15 13:13:36 +00:00
|
|
|
@inherits MSGComponentBase
|
|
|
|
|
|
|
|
|
|
<MudDialog>
|
|
|
|
|
<TitleContent>
|
|
|
|
|
Your attached files
|
|
|
|
|
</TitleContent>
|
|
|
|
|
<DialogContent>
|
|
|
|
|
@foreach (var filePath in this.DocumentPaths)
|
|
|
|
|
{
|
2025-12-16 11:24:12 +00:00
|
|
|
@if (File.Exists(filePath))
|
|
|
|
|
{
|
|
|
|
|
<MudStack Row Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center" Class="mb-2">
|
|
|
|
|
<MudIcon Icon="@Icons.Material.Filled.AttachFile" Class="mr-2"/>
|
|
|
|
|
|
|
|
|
|
<MudText Class="flex-grow-1 overflow-hidden text-ellipsis" Style="white-space: nowrap;">
|
|
|
|
|
@Path.GetFileName(filePath)
|
|
|
|
|
</MudText>
|
|
|
|
|
|
|
|
|
|
<MudIconButton Icon="@Icons.Material.Filled.Delete"
|
|
|
|
|
Color="Color.Error"
|
|
|
|
|
Class="ml-2"
|
|
|
|
|
OnClick="@(() => DeleteAttachment(filePath))"/>
|
|
|
|
|
</MudStack>
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<MudStack Row Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center" Class="mb-2">
|
|
|
|
|
<MudText Class="flex-grow-1 overflow-hidden text-ellipsis" Style="white-space: nowrap;">
|
|
|
|
|
<s>@Path.GetFileName(filePath)</s>
|
|
|
|
|
</MudText>
|
|
|
|
|
|
|
|
|
|
<MudIconButton Icon="@Icons.Material.Filled.Delete"
|
|
|
|
|
Color="Color.Error"
|
|
|
|
|
Class="ml-2"
|
|
|
|
|
OnClick="@(() => DeleteAttachment(filePath))"/>
|
|
|
|
|
</MudStack>
|
|
|
|
|
}
|
2025-12-15 13:13:36 +00:00
|
|
|
}
|
|
|
|
|
</DialogContent>
|
|
|
|
|
<DialogActions>
|
2025-12-15 15:48:41 +00:00
|
|
|
<MudButton OnClick="@this.Close">Close</MudButton>
|
2025-12-15 13:13:36 +00:00
|
|
|
</DialogActions>
|
|
|
|
|
</MudDialog>
|