diff --git a/frontend/angular.json b/frontend/angular.json index a9f9a84..d8c3879 100644 --- a/frontend/angular.json +++ b/frontend/angular.json @@ -21,7 +21,8 @@ { "glob": "**/*", "input": "public" - } + }, + "src/assets" ], "styles": [ "src/styles.css" diff --git a/frontend/src/app/feature/home/home.component.html b/frontend/src/app/feature/home/home.component.html index b0b77d3..9b79a9e 100644 --- a/frontend/src/app/feature/home/home.component.html +++ b/frontend/src/app/feature/home/home.component.html @@ -4,7 +4,7 @@
-
+

Alle Spiele

@@ -18,24 +18,54 @@
-
-
-
- -
+
+ +
+
+
+
-

{{ game.name }}

- +
+

{{ game.name }}

+ +
+
+
+
+
+ + +
+
+
+ +
+
+

{{ game.name }}

+ +
@@ -43,53 +73,5 @@
- -
-
-

Konto

-
- - - - -
-
- - - -
-

Letzte Transaktionen

-
-
-
-

{{ transaction.status }}

-

- {{ transaction.createdAt | date: 'd.m.y H:m' }} -

-
- - {{ transaction.amount | currency: 'EUR' }} - -
-
-
-
diff --git a/frontend/src/app/feature/home/home.component.ts b/frontend/src/app/feature/home/home.component.ts index ef947f9..f032246 100644 --- a/frontend/src/app/feature/home/home.component.ts +++ b/frontend/src/app/feature/home/home.component.ts @@ -1,34 +1,18 @@ -import { ChangeDetectionStrategy, Component, inject, OnInit } from '@angular/core'; -import { AsyncPipe, CurrencyPipe, DatePipe, NgFor } from '@angular/common'; -import { DepositComponent } from '../deposit/deposit.component'; +import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; +import { NgFor } from '@angular/common'; import { ActivatedRoute, Router } from '@angular/router'; -import { ConfirmationComponent } from '@shared/components/confirmation/confirmation.component'; import { Game } from 'app/model/Game'; -import { Observable } from 'rxjs'; -import { TransactionService } from '@service/transaction.service'; import format from 'ajv/dist/vocabularies/format'; -import { TransactionHistoryComponent } from '../transaction-history/transaction-history.component'; -import { TransactionData } from '../../model/TransactionData'; @Component({ selector: 'app-homepage', standalone: true, - imports: [ - CurrencyPipe, - NgFor, - DepositComponent, - ConfirmationComponent, - AsyncPipe, - DatePipe, - TransactionHistoryComponent, - ], + imports: [NgFor], templateUrl: './home.component.html', changeDetection: ChangeDetectionStrategy.OnPush, }) export default class HomeComponent implements OnInit { - isDepositModalOpen = false; isDepositSuccessful = false; - isTransactionModalOpen = false; constructor( public route: ActivatedRoute, @@ -78,35 +62,10 @@ export default class HomeComponent implements OnInit { }, ]; - allGames: Game[] = [...this.featuredGames]; - - recentTransactionData: Observable = - inject(TransactionService).getUsersTransactions(5); - - openDepositModal() { - this.isDepositModalOpen = true; - } - - closeDepositModal() { - this.isDepositModalOpen = false; - } - openDepositConfirmationModal() { this.isDepositSuccessful = true; } - openTransactionModal() { - this.isTransactionModalOpen = true; - } - - closeDepositConfirmationModal() { - this.isDepositSuccessful = false; - } - - closeTransactionModal() { - this.isTransactionModalOpen = false; - } - navigateToGame(route: string) { this.router.navigate([route]); } diff --git a/frontend/src/app/shared/components/navbar/navbar.component.html b/frontend/src/app/shared/components/navbar/navbar.component.html index 7e010fa..451b942 100644 --- a/frontend/src/app/shared/components/navbar/navbar.component.html +++ b/frontend/src/app/shared/components/navbar/navbar.component.html @@ -1,40 +1,118 @@ -