From 08bd735ea9ae4adb48cc3770711fdcfc45fa4ece Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Thu, 29 May 2025 21:31:41 +0200 Subject: [PATCH] Update license URI and improve expansion panel structure --- .../Dialogs/PandocDialog.razor | 18 +++++++++++++++--- .../Dialogs/PandocDialog.razor.cs | 11 ++++------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/app/MindWork AI Studio/Dialogs/PandocDialog.razor b/app/MindWork AI Studio/Dialogs/PandocDialog.razor index ae21eac8..27987064 100644 --- a/app/MindWork AI Studio/Dialogs/PandocDialog.razor +++ b/app/MindWork AI Studio/Dialogs/PandocDialog.razor @@ -17,10 +17,22 @@ + + @if (this.isLoading) + { + + + + } + else if (!string.IsNullOrWhiteSpace(this.licenseText)) + { + + } + Pandoc is distributed under the - GNU General Public License v2 (GPL). + GNU General Public License v2 (GPL). By clicking "Accept GPL and Install", you agree to the terms of the GPL license
and Pandoc will be installed automatically for you. Software under GPL is free of charge and free to use.
@@ -49,7 +61,7 @@ - Pandoc is distributed under the GNU General Public License v2 (GPL). + Pandoc is distributed under the GNU General Public License v2 (GPL). By clicking "Accept GPL and download installer", you agree to the terms of the GPL license. Software under GPL is free of charge and free to use.
@@ -90,7 +102,7 @@ - Pandoc is distributed under the GNU General Public License v2 (GPL). + Pandoc is distributed under the GNU General Public License v2 (GPL). By clicking "Accept GPL and archive", you agree to the terms of the GPL license. Software under GPL is free of charge and free to use.
diff --git a/app/MindWork AI Studio/Dialogs/PandocDialog.razor.cs b/app/MindWork AI Studio/Dialogs/PandocDialog.razor.cs index 8f0af30e..5547b0ef 100644 --- a/app/MindWork AI Studio/Dialogs/PandocDialog.razor.cs +++ b/app/MindWork AI Studio/Dialogs/PandocDialog.razor.cs @@ -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(); } } \ No newline at end of file