From efc2a8ecec77a7d1d6208d7acb8942341225e3d6 Mon Sep 17 00:00:00 2001
From: Phan Huy Tran
Date: Wed, 7 May 2025 13:58:56 +0200
Subject: [PATCH] style: run prettier
---
.../game/blackjack/blackjack.component.ts | 32 +++++++++----------
.../animated-number.component.ts | 4 +--
.../feature/game/slots/slots.component.html | 8 +++--
.../app/feature/game/slots/slots.component.ts | 32 ++++++++-----------
.../transaction-history.component.ts | 17 +++++++---
5 files changed, 49 insertions(+), 44 deletions(-)
diff --git a/frontend/src/app/feature/game/blackjack/blackjack.component.ts b/frontend/src/app/feature/game/blackjack/blackjack.component.ts
index 64ef4ef..a2e760b 100644
--- a/frontend/src/app/feature/game/blackjack/blackjack.component.ts
+++ b/frontend/src/app/feature/game/blackjack/blackjack.component.ts
@@ -1,19 +1,19 @@
-import {ChangeDetectionStrategy, Component, inject, OnInit, signal} from '@angular/core';
-import {CommonModule} from '@angular/common';
-import {Router} from '@angular/router';
-import {DealerHandComponent} from './components/dealer-hand/dealer-hand.component';
-import {PlayerHandComponent} from './components/player-hand/player-hand.component';
-import {GameControlsComponent} from './components/game-controls/game-controls.component';
-import {GameInfoComponent} from './components/game-info/game-info.component';
-import {BlackjackGame, Card} from '@blackjack/models/blackjack.model';
-import {BlackjackService} from '@blackjack/services/blackjack.service';
-import {HttpErrorResponse} from '@angular/common/http';
-import {GameResultComponent} from '@blackjack/components/game-result/game-result.component';
-import {GameState} from '@blackjack/enum/gameState';
-import {NavbarComponent} from '@shared/components/navbar/navbar.component';
-import {UserService} from '@service/user.service';
-import {timer} from 'rxjs';
-import {DebtDialogComponent} from '@shared/components/debt-dialog/debt-dialog.component';
+import { ChangeDetectionStrategy, Component, inject, OnInit, signal } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { Router } from '@angular/router';
+import { DealerHandComponent } from './components/dealer-hand/dealer-hand.component';
+import { PlayerHandComponent } from './components/player-hand/player-hand.component';
+import { GameControlsComponent } from './components/game-controls/game-controls.component';
+import { GameInfoComponent } from './components/game-info/game-info.component';
+import { BlackjackGame, Card } from '@blackjack/models/blackjack.model';
+import { BlackjackService } from '@blackjack/services/blackjack.service';
+import { HttpErrorResponse } from '@angular/common/http';
+import { GameResultComponent } from '@blackjack/components/game-result/game-result.component';
+import { GameState } from '@blackjack/enum/gameState';
+import { NavbarComponent } from '@shared/components/navbar/navbar.component';
+import { UserService } from '@service/user.service';
+import { timer } from 'rxjs';
+import { DebtDialogComponent } from '@shared/components/debt-dialog/debt-dialog.component';
@Component({
selector: 'app-blackjack',
diff --git a/frontend/src/app/feature/game/blackjack/components/animated-number/animated-number.component.ts b/frontend/src/app/feature/game/blackjack/components/animated-number/animated-number.component.ts
index 0b8cd4c..6e61c0e 100644
--- a/frontend/src/app/feature/game/blackjack/components/animated-number/animated-number.component.ts
+++ b/frontend/src/app/feature/game/blackjack/components/animated-number/animated-number.component.ts
@@ -8,8 +8,8 @@ import {
SimpleChanges,
ViewChild,
} from '@angular/core';
-import {CommonModule} from '@angular/common';
-import {CountUp} from 'countup.js';
+import { CommonModule } from '@angular/common';
+import { CountUp } from 'countup.js';
@Component({
selector: 'app-animated-number',
diff --git a/frontend/src/app/feature/game/slots/slots.component.html b/frontend/src/app/feature/game/slots/slots.component.html
index ae15b69..2b6298c 100644
--- a/frontend/src/app/feature/game/slots/slots.component.html
+++ b/frontend/src/app/feature/game/slots/slots.component.html
@@ -31,8 +31,12 @@
-
Game result: {{ slotResult().status | uppercase }}
-
Amount: {{ slotResult().amount }}
+
+ Game result: {{ slotResult().status | uppercase }}
+
+
+ Amount: {{ slotResult().amount }}
+
diff --git a/frontend/src/app/feature/game/slots/slots.component.ts b/frontend/src/app/feature/game/slots/slots.component.ts
index ca8e1d8..cbf2cc8 100644
--- a/frontend/src/app/feature/game/slots/slots.component.ts
+++ b/frontend/src/app/feature/game/slots/slots.component.ts
@@ -1,8 +1,8 @@
-import {ChangeDetectionStrategy, Component, inject, OnInit, signal} from "@angular/core";
-import {NavbarComponent} from "@shared/components/navbar/navbar.component";
-import {HttpClient} from "@angular/common/http";
-import {KeyValuePipe, NgClass, UpperCasePipe} from "@angular/common";
-import {FormsModule} from "@angular/forms";
+import { ChangeDetectionStrategy, Component, inject, OnInit, signal } from '@angular/core';
+import { NavbarComponent } from '@shared/components/navbar/navbar.component';
+import { HttpClient } from '@angular/common/http';
+import { KeyValuePipe, NgClass, UpperCasePipe } from '@angular/common';
+import { FormsModule } from '@angular/forms';
interface SlotResult {
status: 'win' | 'lose';
@@ -13,13 +13,7 @@ interface SlotResult {
@Component({
selector: 'app-slots',
standalone: true,
- imports: [
- NavbarComponent,
- KeyValuePipe,
- UpperCasePipe,
- NgClass,
- FormsModule
- ],
+ imports: [NavbarComponent, KeyValuePipe, UpperCasePipe, NgClass, FormsModule],
templateUrl: './slots.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
@@ -30,25 +24,25 @@ export default class SlotsComponent implements OnInit {
status: 'lose',
amount: 12,
resultMatrix: [
- ["BAR", "BAR", "BAR"],
- ["SEVEN", "SEVEN", "SEVEN"],
- ["BELL", "BELL", "BELL"]
- ]
+ ['BAR', 'BAR', 'BAR'],
+ ['SEVEN', 'SEVEN', 'SEVEN'],
+ ['BELL', 'BELL', 'BELL'],
+ ],
});
betAmount = signal(1);
ngOnInit(): void {
- this.httpClient.get>('/backend/slots/info').subscribe(data => {
+ this.httpClient.get>('/backend/slots/info').subscribe((data) => {
this.slotInfo.set(data);
});
}
spin(): void {
const payload = {
- betAmount: this.betAmount()
+ betAmount: this.betAmount(),
};
- this.httpClient.post('/backend/slots/spin', payload).subscribe(result => {
+ this.httpClient.post('/backend/slots/spin', payload).subscribe((result) => {
this.slotResult.set(result);
});
}
diff --git a/frontend/src/app/feature/transaction-history/transaction-history.component.ts b/frontend/src/app/feature/transaction-history/transaction-history.component.ts
index b0e12f8..338ef4e 100644
--- a/frontend/src/app/feature/transaction-history/transaction-history.component.ts
+++ b/frontend/src/app/feature/transaction-history/transaction-history.component.ts
@@ -1,8 +1,15 @@
-import {ChangeDetectionStrategy, Component, EventEmitter, inject, Input, Output,} from '@angular/core';
-import {TransactionService} from '@service/transaction.service';
-import {Observable} from 'rxjs';
-import {AsyncPipe, CurrencyPipe, DatePipe, NgIf} from '@angular/common';
-import {TransactionData} from '../../model/TransactionData';
+import {
+ ChangeDetectionStrategy,
+ Component,
+ EventEmitter,
+ inject,
+ Input,
+ Output,
+} from '@angular/core';
+import { TransactionService } from '@service/transaction.service';
+import { Observable } from 'rxjs';
+import { AsyncPipe, CurrencyPipe, DatePipe, NgIf } from '@angular/common';
+import { TransactionData } from '../../model/TransactionData';
const PER_PAGE = 5;