mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-02-05 20:09:06 +00:00
29 lines
746 B
C#
29 lines
746 B
C#
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace AIStudio.Components;
|
|
|
|
public partial class Changelog : ComponentBase
|
|
{
|
|
[Inject]
|
|
private HttpClient HttpClient { get; set; } = null!;
|
|
|
|
#region Overrides of ComponentBase
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
await this.ReadLogAsync();
|
|
await base.OnInitializedAsync();
|
|
}
|
|
|
|
#endregion
|
|
|
|
private Log SelectedLog { get; set; } = LOGS.MaxBy(n => n.Build);
|
|
|
|
private string LogContent { get; set; } = string.Empty;
|
|
|
|
private async Task ReadLogAsync()
|
|
{
|
|
var response = await this.HttpClient.GetAsync($"changelog/{this.SelectedLog.Filename}");
|
|
this.LogContent = await response.Content.ReadAsStringAsync();
|
|
}
|
|
} |