perf: increase slots performance by 1500% !!!!
Some checks failed
CI / Get Changed Files (pull_request) Successful in 1m28s
CI / Checkstyle Main (pull_request) Has been skipped
CI / Docker frontend validation (pull_request) Successful in 1m47s
CI / prettier (pull_request) Failing after 1m13s
CI / oxlint (pull_request) Successful in 1m28s
CI / eslint (pull_request) Successful in 1m32s
CI / Docker backend validation (pull_request) Successful in 3m1s
CI / test-build (pull_request) Successful in 29s
Some checks failed
CI / Get Changed Files (pull_request) Successful in 1m28s
CI / Checkstyle Main (pull_request) Has been skipped
CI / Docker frontend validation (pull_request) Successful in 1m47s
CI / prettier (pull_request) Failing after 1m13s
CI / oxlint (pull_request) Successful in 1m28s
CI / eslint (pull_request) Successful in 1m32s
CI / Docker backend validation (pull_request) Successful in 3m1s
CI / test-build (pull_request) Successful in 29s
This commit is contained in:
parent
bce3750f34
commit
e4f8127503
2 changed files with 19 additions and 12 deletions
|
@ -9,15 +9,27 @@
|
|||
<div class="card">
|
||||
<!-- Slot Machine Top -->
|
||||
<div class="p-6">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center justify-between gap-4">
|
||||
<!-- Wrapper for title and win amount -->
|
||||
<div class="flex items-baseline space-x-2">
|
||||
<h2 class="text-xl font-bold text-white">Slot Machine</h2>
|
||||
<span
|
||||
*ngIf="slotResult().status === 'win' && slotResult().amount > 0"
|
||||
class="text-emerald text-lg font-semibold"
|
||||
aria-live="polite"
|
||||
>
|
||||
+{{ slotResult().amount | currency: 'EUR' }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Status Badge -->
|
||||
<div
|
||||
[ngClass]="{
|
||||
'bg-emerald': slotResult().status === 'win',
|
||||
'bg-accent-red': slotResult().status === 'lose',
|
||||
'bg-deep-blue-light': slotResult().status === 'start',
|
||||
}"
|
||||
class="px-3 py-1 rounded-full text-sm font-semibold"
|
||||
class="px-3 py-1 rounded-full text-sm font-semibold whitespace-nowrap"
|
||||
>
|
||||
<span class="text-white">
|
||||
{{
|
||||
|
@ -50,12 +62,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Game Result -->
|
||||
<div class="text-center mb-6" *ngIf="slotResult().status === 'win'">
|
||||
<div class="text-emerald text-xl font-bold">
|
||||
+{{ slotResult().amount | currency: 'EUR' }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Game Result (This section was removed as it's now at the top) -->
|
||||
|
||||
<!-- Controls -->
|
||||
<div class="flex flex-col sm:flex-row gap-4 items-center justify-center">
|
||||
|
|
|
@ -119,7 +119,7 @@ export default class SlotsComponent implements OnInit, OnDestroy {
|
|||
this.userService.refreshCurrentUser();
|
||||
|
||||
this.isSpinning = false;
|
||||
}, 1500);
|
||||
}, 100);
|
||||
},
|
||||
error: (err) => {
|
||||
console.error('Error spinning slot machine:', err);
|
||||
|
|
Reference in a new issue