Fix logs formatting

This commit is contained in:
everoddandeven 2024-10-21 18:10:09 +02:00
parent 9752f27cc2
commit b863e00172
2 changed files with 7 additions and 0 deletions

View file

@ -20,11 +20,14 @@
<div *ngIf="lines.length > 0" class="terminal bg-dark text-light p-3 m-4" #logTerminal> <div *ngIf="lines.length > 0" class="terminal bg-dark text-light p-3 m-4" #logTerminal>
<div class="terminal-output" id="terminalOutput"> <div class="terminal-output" id="terminalOutput">
{{ logs }}
<!--
@for(line of lines; track line) { @for(line of lines; track line) {
<ng-container> <ng-container>
<div>{{ line }}</div> <div>{{ line }}</div>
</ng-container> </ng-container>
} }
-->
</div> </div>
</div> </div>

View file

@ -51,6 +51,10 @@ export class LogsComponent implements AfterViewInit {
return this.logsService.lines; return this.logsService.lines;
} }
public get logs(): string {
return this.lines.join("\n");
}
private scrollToBottom(): void { private scrollToBottom(): void {
this.ngZone.run(() => { this.ngZone.run(() => {
this.lines; this.lines;