From e4f81275036b40f1a335c0d00ed6ec5e8e5e35fc Mon Sep 17 00:00:00 2001 From: Phan Huy Tran Date: Thu, 8 May 2025 14:17:14 +0200 Subject: [PATCH 1/2] perf: increase slots performance by 1500% !!!! --- .../feature/game/slots/slots.component.html | 29 ++++++++++++------- .../app/feature/game/slots/slots.component.ts | 2 +- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/frontend/src/app/feature/game/slots/slots.component.html b/frontend/src/app/feature/game/slots/slots.component.html index c5929df..3ac9bf4 100644 --- a/frontend/src/app/feature/game/slots/slots.component.html +++ b/frontend/src/app/feature/game/slots/slots.component.html @@ -9,15 +9,27 @@
-
-

Slot Machine

+
+ +
+

Slot Machine

+ + +{{ slotResult().amount | currency: 'EUR' }} + +
+ +
{{ @@ -42,20 +54,15 @@ class="bg-deep-blue-contrast rounded-lg shadow-md p-2 flex items-center justify-center" > {{ - cell - }} + cell + }}
} }
- -
-
- +{{ slotResult().amount | currency: 'EUR' }} -
-
+
diff --git a/frontend/src/app/feature/game/slots/slots.component.ts b/frontend/src/app/feature/game/slots/slots.component.ts index 71fa482..6672d06 100644 --- a/frontend/src/app/feature/game/slots/slots.component.ts +++ b/frontend/src/app/feature/game/slots/slots.component.ts @@ -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); -- 2.47.2 From 27c7ee5ff9c8a0b0ca4a0a6d5b87b5d698fafef8 Mon Sep 17 00:00:00 2001 From: Phan Huy Tran Date: Thu, 8 May 2025 14:20:53 +0200 Subject: [PATCH 2/2] style: fml: fml --- frontend/src/app/feature/game/slots/slots.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/feature/game/slots/slots.component.html b/frontend/src/app/feature/game/slots/slots.component.html index 3ac9bf4..794760a 100644 --- a/frontend/src/app/feature/game/slots/slots.component.html +++ b/frontend/src/app/feature/game/slots/slots.component.html @@ -54,8 +54,8 @@ class="bg-deep-blue-contrast rounded-lg shadow-md p-2 flex items-center justify-center" > {{ - cell - }} + cell + }}
} } -- 2.47.2