From d58f24ccbf16a7ea7e347f80cf03361d7a36d537 Mon Sep 17 00:00:00 2001 From: Phan Huy Tran Date: Wed, 21 May 2025 10:36:32 +0200 Subject: [PATCH] feat: style dice game page --- .../app/feature/game/dice/dice.component.html | 97 ++++++++++++------- 1 file changed, 60 insertions(+), 37 deletions(-) diff --git a/frontend/src/app/feature/game/dice/dice.component.html b/frontend/src/app/feature/game/dice/dice.component.html index 4278fb1..6506f8d 100644 --- a/frontend/src/app/feature/game/dice/dice.component.html +++ b/frontend/src/app/feature/game/dice/dice.component.html @@ -1,51 +1,74 @@ -
-

Dice Game

+
+

Dice Game

-
-
- - - @if (hasError('betAmount', 'required')) { - Bet Amount is required - } - @if (hasError('betAmount', 'min')) { - Bet Amount must be at least 0.01 - } +
+
+ +
+
+ + + @if (hasError('betAmount', 'required')) { + Bet Amount is required + } + @if (hasError('betAmount', 'min')) { + Bet Amount must be at least 0.01 + } +
-
- - -
+
+ +
+ + +
+
- - - @if (hasError('targetValue', 'required')) { - Target Value is required - } - @if (hasError('targetValue', 'min')) { - Target Value must be at least 1 - } - @if (hasError('targetValue', 'max')) { - Target Value must be at most 100 - } +
+ + + @if (hasError('targetValue', 'required')) { + Target Value is required + } + @if (hasError('targetValue', 'min')) { + Target Value must be at least 1 + } + @if (hasError('targetValue', 'max')) { + Target Value must be at most 100 + } +
+
+ +
+

Win Chance: {{ winChance() | number:'1.0-2' }}%

+

Potential Win: {{ potentialWin() | currency:'EUR':'symbol':'1.2-2' }}

+
+ + +
-
-

Win Chance: {{ winChance() | number:'1.0-2' }}%

-

Potential Win: {{ potentialWin() | currency:'EUR':'symbol':'1.2-2' }}

+
+ + @if (rolledValue() !== null) { +
+ {{ rolledValue() }} +
+ }
+
- - @if (rolledValue() !== null) { -
-

Result

-

Rolled Value: {{ rolledValue() }}

+
@if (win()) { -

You Won! Payout: {{ payout() | currency:'EUR':'symbol':'1.2-2' }}

+

You Won! Payout: {{ payout() | currency:'EUR':'symbol':'1.2-2' }}

} @else { -

You Lost.

+

You Lost.

}
}