mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 20:27:21 +00:00
28 lines
693 B
C#
28 lines
693 B
C#
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace AIStudio.Components;
|
|
|
|
public partial class Changelog : MSGComponentBase
|
|
{
|
|
[Inject]
|
|
private WebRootFiles WebRootFiles { 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()
|
|
{
|
|
this.LogContent = await this.WebRootFiles.ReadTextAsync($"changelog/{this.SelectedLog.Filename}");
|
|
}
|
|
} |