diff --git a/app/MindWork AI Studio/Components/Pages/About.razor b/app/MindWork AI Studio/Components/Pages/About.razor index f96e772..94c0756 100644 --- a/app/MindWork AI Studio/Components/Pages/About.razor +++ b/app/MindWork AI Studio/Components/Pages/About.razor @@ -19,6 +19,10 @@ + + + + diff --git a/app/MindWork AI Studio/Components/Pages/Home.razor b/app/MindWork AI Studio/Components/Pages/Home.razor index b44f1b2..3638f6b 100644 --- a/app/MindWork AI Studio/Components/Pages/Home.razor +++ b/app/MindWork AI Studio/Components/Pages/Home.razor @@ -25,6 +25,10 @@ + + + + diff --git a/app/MindWork AI Studio/Components/Pages/Home.razor.cs b/app/MindWork AI Studio/Components/Pages/Home.razor.cs index 34b5931..031c37d 100644 --- a/app/MindWork AI Studio/Components/Pages/Home.razor.cs +++ b/app/MindWork AI Studio/Components/Pages/Home.razor.cs @@ -6,6 +6,28 @@ namespace AIStudio.Components.Pages; public partial class Home : ComponentBase { + [Inject] + private HttpClient HttpClient { get; set; } = null!; + + private string LastChangeContent { get; set; } = string.Empty; + + #region Overrides of ComponentBase + + protected override async Task OnInitializedAsync() + { + await this.ReadLastChangeAsync(); + await base.OnInitializedAsync(); + } + + #endregion + + private async Task ReadLastChangeAsync() + { + var latest = Changelog.LOGS.MaxBy(n => n.Build); + var response = await this.HttpClient.GetAsync($"changelog/{latest.Filename}"); + this.LastChangeContent = await response.Content.ReadAsStringAsync(); + } + private static readonly TextItem[] ITEMS_ADVANTAGES = [ new TextItem("Free of charge", "The app is free to use, both for personal and commercial purposes."),