mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-08-20 20:12:57 +00:00
Update license URI and improve expansion panel structure
This commit is contained in:
parent
2c11619740
commit
08bd735ea9
@ -17,10 +17,22 @@
|
||||
</MudJustifiedText>
|
||||
</div>
|
||||
<MudExpansionPanels Class="mb-3" MultiExpansion="@false" Outlined="false" Elevation="0">
|
||||
<ExpansionPanel HeaderText="View GNU General Public License v2 (GPL)" MaxHeight="300" ExpandedChanged="this.OnExpandedChanged">
|
||||
@if (this.isLoading)
|
||||
{
|
||||
<MudSkeleton />
|
||||
<MudSkeleton Animation="Animation.Wave" />
|
||||
<MudSkeleton />
|
||||
}
|
||||
else if (!string.IsNullOrWhiteSpace(this.licenseText))
|
||||
{
|
||||
<MudMarkdown Value="@this.licenseText" OverrideHeaderTypo="@Markdown.OverrideHeaderTypo"/>
|
||||
}
|
||||
</ExpansionPanel>
|
||||
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.AutoFixHigh" HeaderText="Automatic installation" IsExpanded="true">
|
||||
<MudText Typo="Typo.caption">
|
||||
Pandoc is distributed under the
|
||||
<MudLink Typo="Typo.caption" Href="https://github.com/jgm/pandoc/blob/main/COPYRIGHT" Target="_blank">GNU General Public License v2 (GPL)</MudLink>.
|
||||
<MudLink Typo="Typo.caption" Href="https://github.com/jgm/pandoc/blob/main/COPYING.md" Target="_blank">GNU General Public License v2 (GPL)</MudLink>.
|
||||
By clicking "Accept GPL and Install", you agree to the terms of the GPL license <br/> and Pandoc
|
||||
will be installed automatically for you. Software under GPL is <strong>free of charge</strong> and free to use.<br/>
|
||||
</MudText>
|
||||
@ -49,7 +61,7 @@
|
||||
</MudListItem>
|
||||
</MudList>
|
||||
<MudText Class="mb-3" Typo="Typo.caption">
|
||||
Pandoc is distributed under the <MudLink Typo="Typo.caption" Href="https://github.com/jgm/pandoc/blob/main/COPYRIGHT" Target="_blank">GNU General Public License v2 (GPL)</MudLink>.
|
||||
Pandoc is distributed under the <MudLink Typo="Typo.caption" Href="https://github.com/jgm/pandoc/blob/main/COPYING.md" Target="_blank">GNU General Public License v2 (GPL)</MudLink>.
|
||||
By clicking "Accept GPL and download installer", you agree to the terms of the GPL license. Software under GPL is <strong>free of charge</strong> and free to use.<br/>
|
||||
</MudText>
|
||||
<MudButton OnClick="@this.GetInstaller" Color="Color.Secondary" Class="mt-4" Variant="Variant.Filled" Size="Size.Small" StartIcon="@Icons.Material.Filled.Downloading">
|
||||
@ -90,7 +102,7 @@
|
||||
</MudListItem>
|
||||
</MudList>
|
||||
<MudText Class="mb-3" Typo="Typo.caption">
|
||||
Pandoc is distributed under the <MudLink Typo="Typo.caption" Href="https://github.com/jgm/pandoc/blob/main/COPYRIGHT" Target="_blank">GNU General Public License v2 (GPL)</MudLink>.
|
||||
Pandoc is distributed under the <MudLink Typo="Typo.caption" Href="https://github.com/jgm/pandoc/blob/main/COPYING.md" Target="_blank">GNU General Public License v2 (GPL)</MudLink>.
|
||||
By clicking "Accept GPL and archive", you agree to the terms of the GPL license. Software under GPL is <strong>free of charge</strong> and free to use.<br/>
|
||||
</MudText>
|
||||
<MudButton OnClick="@this.GetArchive" Color="Color.Secondary" Class="mt-4" Variant="Variant.Filled" Size="Size.Small" StartIcon="@Icons.Material.Filled.Downloading">
|
||||
|
@ -21,8 +21,8 @@ public partial class PandocDialog : ComponentBase
|
||||
private IMudDialogInstance MudDialog { get; set; } = null!;
|
||||
|
||||
private static readonly ILogger LOG = Program.LOGGER_FACTORY.CreateLogger("PandocDialog");
|
||||
private static readonly string LICENCE_URI = "https://raw.githubusercontent.com/jgm/pandoc/master/COPYRIGHT";
|
||||
private static string PANDOC_VERSION = "1.0.0";
|
||||
private static readonly string LICENCE_URI = "https://raw.githubusercontent.com/jgm/pandoc/refs/heads/main/COPYING.md";
|
||||
private static string PANDOC_VERSION = string.Empty;
|
||||
|
||||
private bool isPandocAvailable;
|
||||
private bool showSkeleton;
|
||||
@ -106,8 +106,6 @@ public partial class PandocDialog : ComponentBase
|
||||
this.isLoading = true;
|
||||
try
|
||||
{
|
||||
await Task.Delay(600);
|
||||
|
||||
this.licenseText = await this.LoadLicenseTextAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -122,7 +120,6 @@ public partial class PandocDialog : ComponentBase
|
||||
}
|
||||
else
|
||||
{
|
||||
await Task.Delay(350);
|
||||
this.licenseText = string.Empty;
|
||||
}
|
||||
}
|
||||
@ -131,7 +128,7 @@ public partial class PandocDialog : ComponentBase
|
||||
{
|
||||
var response = await this.HttpClient.GetAsync(LICENCE_URI);
|
||||
response.EnsureSuccessStatusCode();
|
||||
var content = await response.Content.ReadAsStringAsync();
|
||||
return content;
|
||||
|
||||
return await response.Content.ReadAsStringAsync();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user