Skip to content

Commit

Permalink
only show timeout overlay if it's image are fully loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
b4iterdev committed Jan 20, 2025
1 parent 9de5f94 commit 4ac1f8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/timeout/timeout.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="wrapper" *ngIf="completed === false" [@fade]>
<div class="wrapper" *ngIf="ready == true && completed === false" [@fade]>

Check failure on line 1 in src/app/timeout/timeout.component.html

View workflow job for this annotation

GitHub Actions / lint-format-build (22.x)

Expected `===` but received `==`
<div class="timeout-box" [style.background-image]="setTournamentBackgroundImage()">
<div class="timeout-box-content">
<div class="info-box">
Expand Down
4 changes: 3 additions & 1 deletion src/app/timeout/timeout.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export class TimeoutComponent implements OnInit, AfterViewInit {
groupCode = "UNKNOWN";
socketService!: SocketService;
match: any;
ready: boolean = false;

Check failure on line 25 in src/app/timeout/timeout.component.ts

View workflow job for this annotation

GitHub Actions / lint-format-build (22.x)

Type boolean trivially inferred from a boolean literal, remove type annotation
timeout: any;
team!: string;
tournamentBackgroundUrl!: string;
Expand Down Expand Up @@ -88,8 +89,9 @@ export class TimeoutComponent implements OnInit, AfterViewInit {
this.timeLeft = this.match.tools.timeout?.time ?? 60;
this.socketService.subscribe((data: any) => {
this.updateTimeout(data);
this.ready = true;
this.startTimer();
});
this.startTimer();
}
public updateTimeout(data: any) {
delete data.eventNumber;
Expand Down

0 comments on commit 4ac1f8c

Please sign in to comment.