- {{ errorMsg }}
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
diff --git a/frontend/src/app/feature/deposit/deposit.component.ts b/frontend/src/app/feature/deposit/deposit.component.ts
index 36ec63f..e6545e5 100644
--- a/frontend/src/app/feature/deposit/deposit.component.ts
+++ b/frontend/src/app/feature/deposit/deposit.component.ts
@@ -1,17 +1,10 @@
-import { ChangeDetectionStrategy, Component, inject, OnInit } from '@angular/core';
+import {ChangeDetectionStrategy, Component, EventEmitter, inject, Input, OnInit, Output} from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
import { loadStripe, Stripe } from '@stripe/stripe-js';
import { DepositService } from '../../service/deposit.service';
import { debounceTime } from 'rxjs';
import { environment } from '../../../environments/environment';
import { NgIf } from '@angular/common';
-import {
- MatDialogActions,
- MatDialogContent,
- MatDialogRef,
- MatDialogTitle,
-} from '@angular/material/dialog';
-import { MatButton } from '@angular/material/button';
@Component({
selector: 'app-deposit',
@@ -19,20 +12,17 @@ import { MatButton } from '@angular/material/button';
imports: [
ReactiveFormsModule,
NgIf,
- MatDialogTitle,
- MatDialogContent,
- MatDialogActions,
- MatButton,
],
templateUrl: './deposit.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DepositComponent implements OnInit {
+ @Input() isOpen: boolean = false;
+ @Output() close = new EventEmitter
();
protected form!: FormGroup;
protected errorMsg = '';
private stripe: Stripe | null = null;
private service: DepositService = inject(DepositService);
- public dialogRef: MatDialogRef = inject(MatDialogRef);
async ngOnInit() {
this.form = new FormGroup({
@@ -63,7 +53,7 @@ export class DepositComponent implements OnInit {
});
}
- public closeDialog(): void {
- this.dialogRef.close();
+ public closeModal() {
+ this.close.emit();
}
}
diff --git a/frontend/src/app/feature/home/home.component.html b/frontend/src/app/feature/home/home.component.html
index 56a49cf..011f236 100644
--- a/frontend/src/app/feature/home/home.component.html
+++ b/frontend/src/app/feature/home/home.component.html
@@ -22,7 +22,7 @@
-
![]()
+
@@ -41,7 +41,7 @@
-
![]()
+
@@ -56,10 +56,14 @@
+
Konto
+
@@ -69,6 +73,8 @@
+
+
Letzte Transaktionen
diff --git a/frontend/src/app/feature/home/home.component.ts b/frontend/src/app/feature/home/home.component.ts
index c28b698..a77109b 100644
--- a/frontend/src/app/feature/home/home.component.ts
+++ b/frontend/src/app/feature/home/home.component.ts
@@ -1,17 +1,20 @@
-import { ChangeDetectionStrategy, Component } from '@angular/core';
+import {ChangeDetectionStrategy, Component, inject} from '@angular/core';
import { NavbarComponent } from '../../shared/components/navbar/navbar.component';
import { CurrencyPipe, NgFor } from '@angular/common';
import { Game } from '../../model/Game';
import { Transaction } from '../../model/Transaction';
+import {DepositComponent} from "../deposit/deposit.component";
@Component({
selector: 'app-homepage',
standalone: true,
- imports: [NavbarComponent, CurrencyPipe, NgFor],
+ imports: [NavbarComponent, CurrencyPipe, NgFor, DepositComponent],
templateUrl: './home.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export default class HomeComponent {
+ isDepositModalOpen = false;
+
featuredGames: Game[] = [
{
id: '1',
@@ -67,4 +70,11 @@ export default class HomeComponent {
date: '2024-03-18',
},
];
+
+ openDepositModal(){
+ this.isDepositModalOpen = true;
+ }
+ closeDepositModal(){
+ this.isDepositModalOpen = false;
+ }
}
diff --git a/frontend/src/app/shared/components/navbar/navbar.component.ts b/frontend/src/app/shared/components/navbar/navbar.component.ts
index 53d1dee..5014fec 100644
--- a/frontend/src/app/shared/components/navbar/navbar.component.ts
+++ b/frontend/src/app/shared/components/navbar/navbar.component.ts
@@ -12,7 +12,6 @@ import { KeycloakService } from 'keycloak-angular';
export class NavbarComponent {
isMenuOpen = false;
private keycloakService: KeycloakService = inject(KeycloakService);
-
isLoggedIn = this.keycloakService.isLoggedIn();
login() {
diff --git a/frontend/src/index.html b/frontend/src/index.html
index 8d60cc1..bd4ced1 100644
--- a/frontend/src/index.html
+++ b/frontend/src/index.html
@@ -6,8 +6,10 @@
-
-
+
+
+
+