mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
27 lines
699 B
Plaintext
27 lines
699 B
Plaintext
|
@using Wabbajack.App.Blazor.Models
|
||
|
|
||
|
<div id="virtual-logger">
|
||
|
<Virtualize Items="@_consoleLog" Context="logItem" OverscanCount="3">
|
||
|
<span @key="logItem.MessageId">@logItem.LongMessage</span>
|
||
|
</Virtualize>
|
||
|
</div>
|
||
|
|
||
|
@code {
|
||
|
|
||
|
// TODO: [Low] More parameters to customise the logger. E.g. Reverse order.
|
||
|
// TODO: [High] Find a way to auto-scroll. (JS interop?)
|
||
|
|
||
|
[Parameter]
|
||
|
public IObservable<LoggerProvider.ILogMessage> Messages { get; set; }
|
||
|
|
||
|
private List<LoggerProvider.ILogMessage> _consoleLog = new();
|
||
|
|
||
|
protected override async Task OnInitializedAsync()
|
||
|
{
|
||
|
Messages.Subscribe(_consoleLog.Add);
|
||
|
|
||
|
await base.OnInitializedAsync();
|
||
|
}
|
||
|
|
||
|
}
|