From 1b0a7211d7d27044d55335063c8e3dee8b2e99ee Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Thu, 18 Dec 2025 14:30:28 +0100 Subject: [PATCH] Group items by folder --- .../Dialogs/ReviewAttachmentsDialog.razor | 101 ++++++++++-------- 1 file changed, 58 insertions(+), 43 deletions(-) diff --git a/app/MindWork AI Studio/Dialogs/ReviewAttachmentsDialog.razor b/app/MindWork AI Studio/Dialogs/ReviewAttachmentsDialog.razor index 612491cd..5bde0562 100644 --- a/app/MindWork AI Studio/Dialogs/ReviewAttachmentsDialog.razor +++ b/app/MindWork AI Studio/Dialogs/ReviewAttachmentsDialog.razor @@ -21,54 +21,69 @@ } - @foreach (var filePath in this.DocumentPaths) - { - @if (File.Exists(filePath)) + @{ + var currentFolder = string.Empty; + foreach (var filePath in this.DocumentPaths) { - -
- - - - - @Path.GetFileName(filePath) - - + var folderPath = Path.GetDirectoryName(filePath); + if (folderPath != currentFolder) + { + currentFolder = folderPath; + + + + @folderPath: + + + } + + @if (File.Exists(filePath)) + { + +
+ + + + + @Path.GetFileName(filePath) + + + +
+ + + -
+
- - - - + } + else + { + +
+ + + + + @Path.GetFileName(filePath) + + + +
- } - else - { - -
- - - - - @Path.GetFileName(filePath) - - + + -
- - - - -
+
+ } } }