wabbajack/Wabbajack.App.Blazor/Components/VirtualLogger.razor
Unnoen dc9c327652
Checkbox and Logger components. Layout changes to Configure page.
Also added TODOs and a basic .editorconfig to suppress annoying warnings.
2022-01-18 03:45:52 +11:00

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();
}
}