From 393dd7ec6a58dc0f2b7b5bc2ac9116c7557fd5e8 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Fri, 30 May 2025 17:09:21 +0200 Subject: [PATCH] Add a progress indicator for Pandoc installation steps --- .../Dialogs/PandocDialog.razor | 17 +++++++++++++++-- .../Dialogs/PandocDialog.razor.cs | 5 +++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/app/MindWork AI Studio/Dialogs/PandocDialog.razor b/app/MindWork AI Studio/Dialogs/PandocDialog.razor index 359bd2c1..1ee9a24d 100644 --- a/app/MindWork AI Studio/Dialogs/PandocDialog.razor +++ b/app/MindWork AI Studio/Dialogs/PandocDialog.razor @@ -1,6 +1,13 @@  - @if (this.ShowInstallationPage) + @if (this.isInstallationInProgress) + { + + Please wait for the installation to complete... + + + } + else if (this.ShowInstallationPage) {
@@ -177,7 +184,13 @@ } - @if (this.ShowInstallationPage) + @if (this.isInstallationInProgress) + { + + Close + + } + else if (this.ShowInstallationPage) { Cancel diff --git a/app/MindWork AI Studio/Dialogs/PandocDialog.razor.cs b/app/MindWork AI Studio/Dialogs/PandocDialog.razor.cs index 0a70feb6..eca6754f 100644 --- a/app/MindWork AI Studio/Dialogs/PandocDialog.razor.cs +++ b/app/MindWork AI Studio/Dialogs/PandocDialog.razor.cs @@ -39,6 +39,7 @@ public partial class PandocDialog : ComponentBase private PandocInstallation pandocInstallation; private string? licenseText; private bool isLoadingLicence; + private bool isInstallationInProgress; private int selectedInstallerIndex = SelectInstallerIndex(); private int selectedArchiveIndex = SelectArchiveIndex(); private string downloadUrlArchive = string.Empty; @@ -66,8 +67,12 @@ public partial class PandocDialog : ComponentBase private async Task InstallPandocAsync() { + this.isInstallationInProgress = true; + this.StateHasChanged(); + await Pandoc.InstallAsync(this.RustService); + this.isInstallationInProgress = false; this.MudDialog.Close(DialogResult.Ok(true)); await this.DialogService.ShowAsync("Pandoc Installation", DialogOptions.FULLSCREEN); }