mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-08-20 20:12:57 +00:00
Add ShowInitialResultInSnackbar parameter to PandocDialog
This commit is contained in:
parent
4635fe732a
commit
9b8f2e5fc7
@ -16,6 +16,9 @@ public partial class PandocDialog : ComponentBase
|
||||
|
||||
[Parameter]
|
||||
public bool ShowInstallationPage { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public bool ShowInitialResultInSnackbar { get; set; } = true;
|
||||
|
||||
[Inject]
|
||||
private HttpClient HttpClient { get; set; } = null!;
|
||||
@ -48,16 +51,16 @@ public partial class PandocDialog : ComponentBase
|
||||
await base.OnInitializedAsync();
|
||||
|
||||
LATEST_PANDOC_VERSION = await Pandoc.FetchLatestVersionAsync();
|
||||
await this.CheckPandocAvailabilityAsync();
|
||||
await this.CheckPandocAvailabilityAsync(this.ShowInitialResultInSnackbar);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void Cancel() => this.MudDialog.Cancel();
|
||||
|
||||
private async Task CheckPandocAvailabilityAsync()
|
||||
private async Task CheckPandocAvailabilityAsync(bool useSnackbar)
|
||||
{
|
||||
this.pandocInstallation = await Pandoc.CheckAvailabilityAsync(this.RustService);
|
||||
this.pandocInstallation = await Pandoc.CheckAvailabilityAsync(this.RustService, useSnackbar);
|
||||
await this.InvokeAsync(this.StateHasChanged);
|
||||
}
|
||||
|
||||
|
@ -100,6 +100,7 @@ public partial class About : MSGComponentBase
|
||||
var dialogParameters = new DialogParameters<PandocDialog>
|
||||
{
|
||||
{ x => x.ShowInstallationPage, true },
|
||||
{ x => x.ShowInitialResultInSnackbar, false },
|
||||
};
|
||||
|
||||
await this.DialogService.ShowAsync<PandocDialog>(T("Pandoc Installation"), dialogParameters, DialogOptions.FULLSCREEN);
|
||||
|
Loading…
Reference in New Issue
Block a user