Compare commits

..

3 commits

Author SHA1 Message Date
7f2aeefba2
Merge pull request 'perf: increase slots performance by 1500% !!!!' (!174) from perf-slots into main
All checks were successful
Release / Release (push) Successful in 1m37s
Release / Build Frontend Image (push) Successful in 27s
Release / Build Backend Image (push) Successful in 29s
Reviewed-on: #174
Reviewed-by: Jan K9f <jan@kjan.email>
2025-05-08 12:23:31 +00:00
Phan Huy Tran
27c7ee5ff9 style: fml: fml
All checks were successful
CI / Get Changed Files (pull_request) Successful in 7s
CI / Checkstyle Main (pull_request) Has been skipped
CI / Docker backend validation (pull_request) Successful in 10s
CI / oxlint (pull_request) Successful in 25s
CI / eslint (pull_request) Successful in 31s
CI / prettier (pull_request) Successful in 28s
CI / Docker frontend validation (pull_request) Successful in 43s
CI / test-build (pull_request) Successful in 32s
2025-05-08 14:21:22 +02:00
Phan Huy Tran
e4f8127503 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
2025-05-08 14:17:14 +02:00
2 changed files with 17 additions and 10 deletions

View file

@ -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">

View file

@ -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);