@implements IDisposable
@inject OpenBirchConsole console
@for (int i = 0; i < console.history.Count; i++)
{
int temp = i;
ConsoleLine line = console.history[temp];
@if (line.source == ConsoleSource.User)
{
> @(' ' + line.text)
}
else
{
@line.text
}
}
@code {
protected override void OnInitialized()
{
OpenBirchConsole.OnLinesChanged += updateComp;
}
public void Dispose()
{
OpenBirchConsole.OnLinesChanged -= updateComp;
}
void updateComp(List _)
{
InvokeAsync(StateHasChanged);
}
}