mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-16 07:01:37 +00:00
Group items by folder
This commit is contained in:
parent
9c95ff9c0f
commit
1b0a7211d7
@ -21,11 +21,25 @@
|
||||
</MudJustifiedText>
|
||||
}
|
||||
|
||||
@foreach (var filePath in this.DocumentPaths)
|
||||
@{
|
||||
var currentFolder = string.Empty;
|
||||
foreach (var filePath in this.DocumentPaths)
|
||||
{
|
||||
var folderPath = Path.GetDirectoryName(filePath);
|
||||
if (folderPath != currentFolder)
|
||||
{
|
||||
currentFolder = folderPath;
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Class="mt-6 mb-3">
|
||||
<MudIcon Icon="@Icons.Material.Filled.Folder" Class="mr-2" />
|
||||
<MudText Typo="Typo.h6">
|
||||
@folderPath:
|
||||
</MudText>
|
||||
</MudStack>
|
||||
}
|
||||
|
||||
@if (File.Exists(filePath))
|
||||
{
|
||||
<MudStack Row Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center" Class="mb-2">
|
||||
<MudStack Row Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center" Class="ms-3 mb-2">
|
||||
<div style="min-width: 0; flex: 1; overflow: hidden;">
|
||||
<MudTooltip Text="@T("Your attached file.")" Placement="Placement.Bottom">
|
||||
<span class="d-inline-flex align-items-center" style="overflow: hidden; width: 100%;">
|
||||
@ -49,7 +63,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudStack Row Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center" Class="mb-2">
|
||||
<MudStack Row Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center" Class="ms-3 mb-2">
|
||||
<div style="min-width: 0; flex: 1; overflow: hidden;">
|
||||
<MudTooltip Text="@T("The file was deleted, renamed, or moved.")" Placement="Placement.Bottom">
|
||||
<span class="d-inline-flex align-items-center" style="overflow: hidden; width: 100%;">
|
||||
@ -71,6 +85,7 @@
|
||||
</MudStack>
|
||||
}
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user