fix: Make user not able to enter too much money
Some checks failed
CI / Get Changed Files (pull_request) Successful in 8s
CI / Checkstyle Main (pull_request) Has been skipped
CI / Docker backend validation (pull_request) Has been skipped
CI / oxlint (pull_request) Successful in 21s
CI / eslint (pull_request) Successful in 27s
CI / prettier (pull_request) Failing after 31s
CI / Docker frontend validation (pull_request) Successful in 54s
CI / test-build (pull_request) Successful in 50s
Some checks failed
CI / Get Changed Files (pull_request) Successful in 8s
CI / Checkstyle Main (pull_request) Has been skipped
CI / Docker backend validation (pull_request) Has been skipped
CI / oxlint (pull_request) Successful in 21s
CI / eslint (pull_request) Successful in 27s
CI / prettier (pull_request) Failing after 31s
CI / Docker frontend validation (pull_request) Successful in 54s
CI / test-build (pull_request) Successful in 50s
This commit is contained in:
parent
0d9b0ad987
commit
8b6e026e0a
5 changed files with 79 additions and 17 deletions
|
@ -102,15 +102,25 @@
|
|||
|
||||
<!-- Custom bet input -->
|
||||
<div class="space-y-1">
|
||||
<label for="bet" class="text-sm text-text-secondary">Bet Amount</label>
|
||||
<div class="flex justify-between">
|
||||
<label for="bet" class="text-sm text-text-secondary">Bet Amount</label>
|
||||
<span *ngIf="isInvalidBet()" class="text-xs text-accent-red animate-pulse"
|
||||
>Cannot exceed balance</span
|
||||
>
|
||||
</div>
|
||||
<input
|
||||
type="number"
|
||||
id="bet"
|
||||
class="w-full px-3 py-2 bg-deep-blue-light text-white rounded focus:outline-none focus:ring-2 focus:ring-emerald disabled:opacity-50"
|
||||
class="w-full px-3 py-2 bg-deep-blue-light text-white rounded focus:outline-none focus:ring-2 disabled:opacity-50"
|
||||
[ngClass]="{
|
||||
'ring-accent-red': isInvalidBet(),
|
||||
'ring-emerald': !isInvalidBet(),
|
||||
}"
|
||||
[min]="1"
|
||||
[max]="balance()"
|
||||
[ngModel]="betInputValue()"
|
||||
(input)="updateBet($event)"
|
||||
(keydown)="validateBetInput($event)"
|
||||
step="1"
|
||||
[disabled]="gameInProgress()"
|
||||
[placeholder]="balance() | currency: 'EUR'"
|
||||
|
|
Reference in a new issue