mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-13 09:21:37 +00:00
44 lines
1.7 KiB
Plaintext
44 lines
1.7 KiB
Plaintext
@inherits MSGComponentBase
|
|
|
|
<MudDialog>
|
|
<TitleContent>
|
|
Your attached files
|
|
</TitleContent>
|
|
<DialogContent>
|
|
@foreach (var filePath in this.DocumentPaths)
|
|
{
|
|
@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>
|
|
}
|
|
}
|
|
</DialogContent>
|
|
<DialogActions>
|
|
<MudButton OnClick="@this.Close">Close</MudButton>
|
|
</DialogActions>
|
|
</MudDialog> |