diff --git a/frontend/bun.lock b/frontend/bun.lock index 91de068..f5631b4 100644 --- a/frontend/bun.lock +++ b/frontend/bun.lock @@ -10,7 +10,6 @@ "@angular/compiler": "^18.2.0", "@angular/core": "^18.2.0", "@angular/forms": "^18.2.0", - "@angular/material": "~18.2.14", "@angular/platform-browser": "^18.2.0", "@angular/platform-browser-dynamic": "^18.2.0", "@angular/router": "^18.2.0", @@ -93,8 +92,6 @@ "@angular/forms": ["@angular/forms@18.2.13", "", { "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { "@angular/common": "18.2.13", "@angular/core": "18.2.13", "@angular/platform-browser": "18.2.13", "rxjs": "^6.5.3 || ^7.4.0" } }, "sha512-A67D867fu3DSBhdLWWZl/F5pr7v2+dRM2u3U7ZJ0ewh4a+sv+0yqWdJW+a8xIoiHxS+btGEJL2qAKJiH+MCFfg=="], - "@angular/material": ["@angular/material@18.2.14", "", { "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { "@angular/animations": "^18.0.0 || ^19.0.0", "@angular/cdk": "18.2.14", "@angular/common": "^18.0.0 || ^19.0.0", "@angular/core": "^18.0.0 || ^19.0.0", "@angular/forms": "^18.0.0 || ^19.0.0", "@angular/platform-browser": "^18.0.0 || ^19.0.0", "rxjs": "^6.5.3 || ^7.4.0" } }, "sha512-28pxzJP49Mymt664WnCtPkKeg7kXUsQKTKGf/Kl95rNTEdTJLbnlcc8wV0rT0yQNR7kXgpfBnG7h0ETLv/iu5Q=="], - "@angular/platform-browser": ["@angular/platform-browser@18.2.13", "", { "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { "@angular/animations": "18.2.13", "@angular/common": "18.2.13", "@angular/core": "18.2.13" }, "optionalPeers": ["@angular/animations"] }, "sha512-tu7ZzY6qD3ATdWFzcTcsAKe7M6cJeWbT/4/bF9unyGO3XBPcNYDKoiz10+7ap2PUd0fmPwvuvTvSNJiFEBnB8Q=="], "@angular/platform-browser-dynamic": ["@angular/platform-browser-dynamic@18.2.13", "", { "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { "@angular/common": "18.2.13", "@angular/compiler": "18.2.13", "@angular/core": "18.2.13", "@angular/platform-browser": "18.2.13" } }, "sha512-kbQCf9+8EpuJC7buBxhSiwBtXvjAwAKh6MznD6zd2pyCYqfY6gfRCZQRtK59IfgVtKmEONWI9grEyNIRoTmqJg=="], diff --git a/frontend/package.json b/frontend/package.json index c79aae0..646c8a4 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -19,7 +19,6 @@ "@angular/compiler": "^18.2.0", "@angular/core": "^18.2.0", "@angular/forms": "^18.2.0", - "@angular/material": "~18.2.14", "@angular/platform-browser": "^18.2.0", "@angular/platform-browser-dynamic": "^18.2.0", "@angular/router": "^18.2.0", @@ -53,4 +52,4 @@ "typescript": "~5.5.2", "typescript-eslint": "8.23.0" } -} +} \ No newline at end of file diff --git a/frontend/src/app/feature/deposit/deposit.component.html b/frontend/src/app/feature/deposit/deposit.component.html index 707d145..91179a3 100644 --- a/frontend/src/app/feature/deposit/deposit.component.html +++ b/frontend/src/app/feature/deposit/deposit.component.html @@ -1,21 +1,32 @@ -

Guthaben aufladen

- -
-
- {{ errorMsg }} + +
+
+

Guthaben aufladen

+ +
+ {{ errorMsg }} +
+
+ + +
+ +
+ + +
-
- - -
- - - - - - +
+
diff --git a/frontend/src/app/feature/deposit/deposit.component.ts b/frontend/src/app/feature/deposit/deposit.component.ts index 36ec63f..7a45859 100644 --- a/frontend/src/app/feature/deposit/deposit.component.ts +++ b/frontend/src/app/feature/deposit/deposit.component.ts @@ -1,38 +1,33 @@ -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', standalone: true, - imports: [ - ReactiveFormsModule, - NgIf, - MatDialogTitle, - MatDialogContent, - MatDialogActions, - MatButton, - ], + imports: [ReactiveFormsModule, NgIf], templateUrl: './deposit.component.html', changeDetection: ChangeDetectionStrategy.OnPush, }) export class DepositComponent implements OnInit { + @Input() isOpen = 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 +58,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..cc1ed16 100644 --- a/frontend/src/app/feature/home/home.component.html +++ b/frontend/src/app/feature/home/home.component.html @@ -60,6 +60,8 @@

Konto

+ + diff --git a/frontend/src/app/feature/home/home.component.ts b/frontend/src/app/feature/home/home.component.ts index c28b698..6400d5a 100644 --- a/frontend/src/app/feature/home/home.component.ts +++ b/frontend/src/app/feature/home/home.component.ts @@ -3,15 +3,18 @@ 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/styles.css b/frontend/src/styles.css index f78bf74..bfdb7fb 100644 --- a/frontend/src/styles.css +++ b/frontend/src/styles.css @@ -138,10 +138,3 @@ a { .footer-disclaimer { @apply text-xs; } - -.mat-mdc-dialog-container { - --mdc-dialog-container-color: var(--color-deep-blue-light) important; - --mdc-dialog-subhead-color: var(--color-text-primary) important; - --mdc-dialog-supporting-text-color: var(--color-text-secondary) important; - --mdc-dialog-container-shape: 6px important; -}