mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-08-21 04:12:56 +00:00
Replace showInstallationPage field with a public parameter
This commit is contained in:
parent
6697e8a1f8
commit
eb75109464
@ -1,6 +1,6 @@
|
|||||||
<MudDialog>
|
<MudDialog>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
@if (this.showInstallationPage)
|
@if (this.ShowInstallationPage)
|
||||||
{
|
{
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<MudJustifiedText Typo="Typo.body1" Class="mb-2">
|
<MudJustifiedText Typo="Typo.body1" Class="mb-2">
|
||||||
@ -177,7 +177,7 @@
|
|||||||
}
|
}
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
@if (this.showInstallationPage)
|
@if (this.ShowInstallationPage)
|
||||||
{
|
{
|
||||||
<MudButton OnClick="@this.Cancel" Variant="Variant.Filled">
|
<MudButton OnClick="@this.Cancel" Variant="Variant.Filled">
|
||||||
Cancel
|
Cancel
|
||||||
|
@ -14,6 +14,9 @@ public partial class PandocDialog : ComponentBase
|
|||||||
private static readonly MetaDataArchitectureAttribute META_DATA_ARCH = ASSEMBLY.GetCustomAttribute<MetaDataArchitectureAttribute>()!;
|
private static readonly MetaDataArchitectureAttribute META_DATA_ARCH = ASSEMBLY.GetCustomAttribute<MetaDataArchitectureAttribute>()!;
|
||||||
private static readonly RID CPU_ARCHITECTURE = META_DATA_ARCH.Architecture.ToRID();
|
private static readonly RID CPU_ARCHITECTURE = META_DATA_ARCH.Architecture.ToRID();
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public bool ShowInstallationPage { get; set; }
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
private HttpClient HttpClient { get; set; } = null!;
|
private HttpClient HttpClient { get; set; } = null!;
|
||||||
|
|
||||||
@ -31,7 +34,6 @@ public partial class PandocDialog : ComponentBase
|
|||||||
private static string LATEST_PANDOC_VERSION = string.Empty;
|
private static string LATEST_PANDOC_VERSION = string.Empty;
|
||||||
|
|
||||||
private PandocInstallation pandocInstallation;
|
private PandocInstallation pandocInstallation;
|
||||||
private bool showInstallationPage;
|
|
||||||
private string? licenseText;
|
private string? licenseText;
|
||||||
private bool isLoadingLicence;
|
private bool isLoadingLicence;
|
||||||
private int selectedInstallerIndex = SelectInstallerIndex();
|
private int selectedInstallerIndex = SelectInstallerIndex();
|
||||||
@ -62,12 +64,12 @@ public partial class PandocDialog : ComponentBase
|
|||||||
private async Task InstallPandocAsync()
|
private async Task InstallPandocAsync()
|
||||||
{
|
{
|
||||||
await Pandoc.InstallAsync(this.RustService);
|
await Pandoc.InstallAsync(this.RustService);
|
||||||
this.MudDialog.Close(DialogResult.Ok(true));
|
|
||||||
|
|
||||||
|
this.MudDialog.Close(DialogResult.Ok(true));
|
||||||
await this.DialogService.ShowAsync<PandocDialog>("pandoc dialog");
|
await this.DialogService.ShowAsync<PandocDialog>("pandoc dialog");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProceedToInstallation() => this.showInstallationPage = true;
|
private void ProceedToInstallation() => this.ShowInstallationPage = true;
|
||||||
|
|
||||||
private async Task RejectLicense()
|
private async Task RejectLicense()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user