mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-08-20 16:52:57 +00:00
Add a progress indicator for Pandoc installation steps
This commit is contained in:
parent
3c0d2cd6fb
commit
393dd7ec6a
@ -1,6 +1,13 @@
|
||||
<MudDialog>
|
||||
<DialogContent>
|
||||
@if (this.ShowInstallationPage)
|
||||
@if (this.isInstallationInProgress)
|
||||
{
|
||||
<MudText Typo="Typo.h4" Class="mb-3">
|
||||
Please wait for the installation to complete...
|
||||
</MudText>
|
||||
<MudProgressLinear Color="Color.Primary" Indeterminate="@true" Size="Size.Large" Rounded="@true"/>
|
||||
}
|
||||
else if (this.ShowInstallationPage)
|
||||
{
|
||||
<div class="mb-4">
|
||||
<MudJustifiedText Typo="Typo.body1" Class="mb-2">
|
||||
@ -177,7 +184,13 @@
|
||||
}
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
@if (this.ShowInstallationPage)
|
||||
@if (this.isInstallationInProgress)
|
||||
{
|
||||
<MudButton OnClick="@this.Cancel" Variant="Variant.Filled">
|
||||
Close
|
||||
</MudButton>
|
||||
}
|
||||
else if (this.ShowInstallationPage)
|
||||
{
|
||||
<MudButton OnClick="@this.Cancel" Variant="Variant.Filled">
|
||||
Cancel
|
||||
|
@ -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<PandocDialog>("Pandoc Installation", DialogOptions.FULLSCREEN);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user