From 684da6298322b69e33c8ebb6db0fe8547550828c Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Tue, 30 Dec 2025 17:28:01 +0100 Subject: [PATCH] Add preview functionality for file attachments in ReviewAttachmentsDialog --- .../Dialogs/ReviewAttachmentsDialog.razor | 41 +++++++++++-------- .../Dialogs/ReviewAttachmentsDialog.razor.cs | 14 +++++++ 2 files changed, 39 insertions(+), 16 deletions(-) diff --git a/app/MindWork AI Studio/Dialogs/ReviewAttachmentsDialog.razor b/app/MindWork AI Studio/Dialogs/ReviewAttachmentsDialog.razor index 3602adf0..971e5892 100644 --- a/app/MindWork AI Studio/Dialogs/ReviewAttachmentsDialog.razor +++ b/app/MindWork AI Studio/Dialogs/ReviewAttachmentsDialog.razor @@ -46,19 +46,24 @@ - - - + + + + + + + + + - } else { - +
@@ -70,13 +75,17 @@
- - - + + + + + + +
} } diff --git a/app/MindWork AI Studio/Dialogs/ReviewAttachmentsDialog.razor.cs b/app/MindWork AI Studio/Dialogs/ReviewAttachmentsDialog.razor.cs index 21af5418..aa12f128 100644 --- a/app/MindWork AI Studio/Dialogs/ReviewAttachmentsDialog.razor.cs +++ b/app/MindWork AI Studio/Dialogs/ReviewAttachmentsDialog.razor.cs @@ -46,4 +46,18 @@ public partial class ReviewAttachmentsDialog : MSGComponentBase this.StateHasChanged(); } } + + /// + /// The user might want to check what we actually extract from his file and therefore give the LLM as an input. + /// + /// The file to check. + private async Task InvestigateFile(FileAttachment fileAttachment) + { + var dialogParameters = new DialogParameters + { + { x => x.Document, fileAttachment }, + }; + + await this.DialogService.ShowAsync(T("Document Preview"), dialogParameters, DialogOptions.FULLSCREEN); + } } \ No newline at end of file