feat(blackjack): add balance display to game result component
This commit is contained in:
parent
68a226b677
commit
801edfe89e
2 changed files with 7 additions and 7 deletions
|
@ -48,6 +48,7 @@
|
||||||
<app-game-result
|
<app-game-result
|
||||||
[gameState]="gameState()"
|
[gameState]="gameState()"
|
||||||
[amount]="currentBet()"
|
[amount]="currentBet()"
|
||||||
|
[balance]="balance()"
|
||||||
[show]="showGameResult()"
|
[show]="showGameResult()"
|
||||||
(gameResultClosed)="onCloseGameResult()"
|
(gameResultClosed)="onCloseGameResult()"
|
||||||
></app-game-result>
|
></app-game-result>
|
||||||
|
|
|
@ -27,15 +27,14 @@ import { GameState } from '../../enum/gameState';
|
||||||
'text-yellow-400': isDraw
|
'text-yellow-400': isDraw
|
||||||
}">
|
}">
|
||||||
{{ isLoss ? '-' : '+' }}{{ isWin ? (amount * 2) : amount | currency:'EUR' }}
|
{{ isLoss ? '-' : '+' }}{{ isWin ? (amount * 2) : amount | currency:'EUR' }}
|
||||||
|
<div *ngIf="isWin" class="text-xs text-text-secondary">
|
||||||
|
(Einsatz {{ amount | currency:'EUR' }} × 2)
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-text-secondary border-t border-text-secondary/20 pt-3 font-medium">Gesamt:</div>
|
<div class="text-text-secondary border-t border-text-secondary/20 pt-3 font-medium">Kontostand:</div>
|
||||||
<div class="font-medium text-right border-t border-text-secondary/20 pt-3" [ngClass]="{
|
<div class="font-medium text-right border-t border-text-secondary/20 pt-3">
|
||||||
'text-emerald': isWin,
|
{{ balance | currency:'EUR' }}
|
||||||
'text-accent-red': isLoss,
|
|
||||||
'text-white': isDraw
|
|
||||||
}">
|
|
||||||
{{ isWin ? (amount * 2) : (isDraw ? amount : 0) | currency:'EUR' }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Reference in a new issue