comfirmation modal for deposit and refactoring

This commit is contained in:
Lea 2025-03-05 10:20:31 +01:00
parent 63db07b6ae
commit caf2794489
8 changed files with 74 additions and 32 deletions

View file

@ -0,0 +1,14 @@
@if (successful) {
<div class="modal-bg">
<div class="modal-card">
<h2 class="modal-heading text-center">Bestätigung</h2>
<p class="py-2">Der Vorgang wurde erfolgreich abgeschlossen.</p>
<button
type="button"
class="button-primary w-full py-2 my-auto"
(click)="closeModal()"
>Schließen</button>
</div>
</div>
}

View file

@ -0,0 +1,16 @@
import {Component, EventEmitter, Input, Output} from '@angular/core';
@Component({
selector: 'app-confirmation',
standalone: true,
imports: [],
templateUrl: './confirmation.component.html',
})
export class ConfirmationComponent {
@Input() successful: boolean = true;
@Output() close = new EventEmitter<void>();
public closeModal(){
this.close.emit();
}
}

View file

@ -12,10 +12,10 @@
<div class="hidden md:flex items-center space-x-4">
@if (!isLoggedIn) {
<button (click)="login()" class="button-base px-4 py-1.5">Anmelden</button>
<button (click)="login()" class="button-primary px-4 py-1.5">Anmelden</button>
}
@if (isLoggedIn) {
<button (click)="logout()" class="button-base px-4 py-1.5">Abmelden</button>
<button (click)="logout()" class="button-primary px-4 py-1.5">Abmelden</button>
}
</div>
@ -58,10 +58,10 @@
<a routerLink="/games" class="nav-mobile-link">Spiele</a>
<div class="pt-2 space-y-2">
@if (!isLoggedIn) {
<button (click)="login()" class="button-base w-full py-1.5">Anmelden</button>
<button (click)="login()" class="button-primary w-full py-1.5">Anmelden</button>
}
@if (isLoggedIn) {
<button (click)="logout()" class="button-base w-full py-1.5">Abmelden</button>
<button (click)="logout()" class="button-primary w-full py-1.5">Abmelden</button>
}
</div>
</div>