tgd-frontend/src/app/components/game-queue/game-queue.component.html
2024-11-28 01:31:02 +04:00

64 lines
No EOL
3.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="queue-container" [ngClass]="{
'penalty': action.type === gameQueueTypes.penalty,
'prize': action.type === gameQueueTypes.giveOutAPrize,
'results': action.type === gameQueueTypes.showresults
}">
<div class="queue-info p-2">
<div class="row justify-content-around">
<div class="col" *ngIf="action.type !== gameQueueTypes.showresults">
<app-participant-item *ngIf="participant" [participant]="participant" [small]="true"></app-participant-item>
</div>
<div class="col" *ngIf="action.type !== gameQueueTypes.showresults">
<div *ngIf="action.type === gameQueueTypes.giveOutAPrize">
<h1 class="animate__flip animate__animated">Ура, приз!</h1>
<audio src="assets/sfx/prize.mp3" autoplay></audio>
<div *ngIf="showPrize">
<h3 class="animate__animated animate__backInUp"> {{ prize.name }}</h3>
<audio [src]="prizeAudioSrc" autoplay></audio>
</div>
<app-countdown (completed)="countdownCompleted()" *ngIf="showCountdown" [countdown]="countdown"></app-countdown>
</div>
<div *ngIf="action.type === gameQueueTypes.penalty">
<h1 class="animate__animated animate__flip">Наказание</h1>
<h3 class="animate__animated animate__backInUp">{{ penalty }}</h3>
<audio *ngIf="penalty" [src]="getAudio(penalty)" autoplay></audio>
<app-countdown (completed)="countdownCompleted()" *ngIf="showCountdown" [countdown]="countdown"></app-countdown>
</div>
<div *ngIf="action.type === gameQueueTypes.additionalQuestion">
<app-question *ngIf="showQuestion" [question]="question"></app-question>
</div>
<div *ngIf="action.type === gameQueueTypes.screpa">
<audio [src]="getAudio(screpaText,2)" autoplay></audio>
<app-skrepa [text]="screpaText"></app-skrepa>
</div>
</div>
<div class="col" *ngIf="action.type === gameQueueTypes.showresults">
<div *ngIf="results && (results.valid.length > 0 || results.invalid.length > 0)">
<div class="d-flex flex-row flex-wrap w-100 justify-content-center">
<h2 *ngIf="results.valid.length > 0">Ответили правильно</h2>
</div>
<div class="d-flex flex-row w-100 justify-content-center">
<div *ngFor="let item of results.valid">
<app-participant-item [participant]="participants[item.user]" [small]="true"></app-participant-item>
</div>
</div>
<div class="d-flex flex-row flex-wrap w-100 justify-content-center">
<h2 *ngIf="results.invalid.length > 0">Не смогли</h2>
</div>
<div class="d-flex flex-row w-100 justify-content-center">
<div *ngFor="let item of results.invalid">
<app-participant-item [participant]="participants[item.user]" [small]="true"></app-participant-item>
</div>
</div>
</div>
<div *ngIf="!results || (results.valid.length === 0 && results.invalid.length === 0)">
<h1>Результаты (не утешительные)</h1>
<h2>Так вышло, что никто не ответил на вопросы вообще</h2>
</div>
</div>
</div>
</div>
</div>
<div class="versus-container" *ngIf="action && action.type === gameQueueTypes.versus">
</div>