Compare commits

..

No commits in common. "7bec17dd52a5f9dbea43de0199f88cc20112a477" and "40c402ae36fce63ec3bf8285934bd5dc5689023e" have entirely different histories.

4 changed files with 28 additions and 67 deletions

View file

@ -44,6 +44,7 @@
</div> </div>
</div> </div>
<!-- Game Result Modal -->
<app-game-result <app-game-result
[gameState]="gameState()" [gameState]="gameState()"
[amount]="currentBet()" [amount]="currentBet()"
@ -52,6 +53,7 @@
(gameResultClosed)="onCloseGameResult()" (gameResultClosed)="onCloseGameResult()"
></app-game-result> ></app-game-result>
<!-- Debt Dialog -->
<app-debt-dialog <app-debt-dialog
[amount]="debtAmount()" [amount]="debtAmount()"
[show]="showDebtDialog()" [show]="showDebtDialog()"

View file

@ -13,35 +13,28 @@ import { GameState } from '../../enum/gameState';
<h2 class="modal-heading" [class]="getResultClass()">{{ getResultTitle() }}</h2> <h2 class="modal-heading" [class]="getResultClass()">{{ getResultTitle() }}</h2>
<p class="py-2 text-text-secondary mb-4">{{ getResultMessage() }}</p> <p class="py-2 text-text-secondary mb-4">{{ getResultMessage() }}</p>
<div <div class="bg-deep-blue-light/50 rounded-lg p-5 mb-6 shadow-inner border border-deep-blue-light/30">
class="bg-deep-blue-light/50 rounded-lg p-5 mb-6 shadow-inner border border-deep-blue-light/30"
>
<div class="grid grid-cols-2 gap-4"> <div class="grid grid-cols-2 gap-4">
<div class="text-text-secondary">Einsatz:</div> <div class="text-text-secondary">Einsatz:</div>
<div class="font-medium text-right">{{ amount | currency: 'EUR' }}</div> <div class="font-medium text-right">{{ amount | currency:'EUR' }}</div>
<div class="text-text-secondary"> <div class="text-text-secondary">
{{ isDraw ? 'Zurückgegeben:' : isWin ? 'Gewonnen:' : 'Verloren:' }} {{ isDraw ? 'Zurückgegeben:' : isWin ? 'Gewonnen:' : 'Verloren:' }}
</div> </div>
<div <div class="font-medium text-right" [ngClass]="{
class="font-medium text-right"
[ngClass]="{
'text-emerald': isWin, 'text-emerald': isWin,
'text-accent-red': isLoss, 'text-accent-red': isLoss,
'text-yellow-400': isDraw, 'text-yellow-400': isDraw
}" }">
> {{ isLoss ? '-' : '+' }}{{ isWin ? (amount * 2) : amount | currency:'EUR' }}
{{ isLoss ? '-' : '+' }}{{ isWin ? amount * 2 : (amount | currency: 'EUR') }}
<div *ngIf="isWin" class="text-xs text-text-secondary"> <div *ngIf="isWin" class="text-xs text-text-secondary">
(Einsatz {{ amount | currency: 'EUR' }} × 2) (Einsatz {{ amount | currency:'EUR' }} × 2)
</div> </div>
</div> </div>
<div class="text-text-secondary border-t border-text-secondary/20 pt-3 font-medium"> <div class="text-text-secondary border-t border-text-secondary/20 pt-3 font-medium">Kontostand:</div>
Kontostand:
</div>
<div class="font-medium text-right border-t border-text-secondary/20 pt-3"> <div class="font-medium text-right border-t border-text-secondary/20 pt-3">
{{ balance | currency: 'EUR' }} {{ balance | currency:'EUR' }}
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,13 +1,4 @@
import { import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnDestroy, OnInit, Output, signal } from '@angular/core';
ChangeDetectionStrategy,
Component,
EventEmitter,
Input,
OnDestroy,
OnInit,
Output,
signal,
} from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { animate, style, transition, trigger } from '@angular/animations'; import { animate, style, transition, trigger } from '@angular/animations';
import { interval, takeWhile } from 'rxjs'; import { interval, takeWhile } from 'rxjs';
@ -21,18 +12,15 @@ import { interval, takeWhile } from 'rxjs';
<div class="modal-card" [@cardAnimation]> <div class="modal-card" [@cardAnimation]>
<h2 class="modal-heading text-accent-red">WARNUNG!</h2> <h2 class="modal-heading text-accent-red">WARNUNG!</h2>
<p class="py-2 text-text-secondary mb-4"> <p class="py-2 text-text-secondary mb-4">
Du hast nicht genug Geld für den Double Down. Du bist jetzt im Minus und schuldest uns Du hast nicht genug Geld für den Double Down. Du bist jetzt im Minus und schuldest uns {{ amount | currency:'EUR' }}.
{{ amount | currency: 'EUR' }}.
</p> </p>
<p class="py-2 text-accent-red mb-4 font-bold"> <p class="py-2 text-accent-red mb-4 font-bold">
Liefer das Geld sofort an den Dead Drop oder es wird unangenehme Konsequenzen geben! Liefer das Geld sofort an den Dead Drop oder es wird unangenehme Konsequenzen geben!
</p> </p>
<div <div class="bg-deep-blue-light/50 rounded-lg p-5 mb-6 shadow-inner border border-deep-blue-light/30">
class="bg-deep-blue-light/50 rounded-lg p-5 mb-6 shadow-inner border border-deep-blue-light/30"
>
<div class="grid grid-cols-2 gap-4"> <div class="grid grid-cols-2 gap-4">
<div class="text-text-secondary">Schulden:</div> <div class="text-text-secondary">Schulden:</div>
<div class="font-medium text-right text-accent-red">{{ amount | currency: 'EUR' }}</div> <div class="font-medium text-right text-accent-red">{{ amount | currency:'EUR' }}</div>
</div> </div>
</div> </div>
<div class="text-center mb-6"> <div class="text-center mb-6">
@ -50,39 +38,19 @@ import { interval, takeWhile } from 'rxjs';
<div class="text-center mb-6"> <div class="text-center mb-6">
<div class="relative"> <div class="relative">
<div class="absolute inset-0 bg-accent-red/20 blur-xl rounded-full"></div> <div class="absolute inset-0 bg-accent-red/20 blur-xl rounded-full"></div>
<div <div class="relative bg-gradient-to-b from-accent-red to-red-900 p-8 rounded-lg border-2 border-accent-red shadow-lg">
class="relative bg-gradient-to-b from-accent-red to-red-900 p-8 rounded-lg border-2 border-accent-red shadow-lg"
>
<div class="flex items-center justify-center gap-4 mb-4"> <div class="flex items-center justify-center gap-4 mb-4">
<svg <svg class="w-12 h-12 text-accent-red animate-[spin_2s_linear_infinite]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
class="w-12 h-12 text-accent-red animate-[spin_2s_linear_infinite]" <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z"/>
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="currentColor"
>
<path
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z"
/>
</svg> </svg>
<span <span class="text-4xl font-black tracking-wider text-white animate-[pulse_1s_ease-in-out_infinite]">
class="text-4xl font-black tracking-wider text-white animate-[pulse_1s_ease-in-out_infinite]"
>
ZEIT ABGELAUFEN ZEIT ABGELAUFEN
</span> </span>
<svg <svg class="w-12 h-12 text-accent-red animate-[spin_2s_linear_infinite]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
class="w-12 h-12 text-accent-red animate-[spin_2s_linear_infinite]" <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z"/>
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="currentColor"
>
<path
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z"
/>
</svg> </svg>
</div> </div>
<div <div class="text-2xl font-bold text-white/90 tracking-wider animate-[pulse_1s_ease-in-out_infinite]">
class="text-2xl font-bold text-white/90 tracking-wider animate-[pulse_1s_ease-in-out_infinite]"
>
KONSEQUENZEN FOLGEN KONSEQUENZEN FOLGEN
</div> </div>
</div> </div>
@ -149,7 +117,7 @@ export class DebtDialogComponent implements OnInit, OnDestroy {
this.timerSubscription = interval(1000) this.timerSubscription = interval(1000)
.pipe(takeWhile(() => this.timeLeft() > 0)) .pipe(takeWhile(() => this.timeLeft() > 0))
.subscribe(() => { .subscribe(() => {
this.timeLeft.update((value) => value - 1); this.timeLeft.update(value => value - 1);
if (this.timeLeft() <= 5) { if (this.timeLeft() <= 5) {
this.warningSound.play(); this.warningSound.play();
} }

View file

@ -19,9 +19,7 @@
class="text-white font-bold bg-deep-blue-contrast rounded-full px-4 py-2 text-sm hover:bg-deep-blue-contrast/80 hover:cursor-pointer hover:scale-105 transition-all active:scale-95 select-none duration-300" class="text-white font-bold bg-deep-blue-contrast rounded-full px-4 py-2 text-sm hover:bg-deep-blue-contrast/80 hover:cursor-pointer hover:scale-105 transition-all active:scale-95 select-none duration-300"
routerLink="/home" routerLink="/home"
> >
<span [class]="balance() < 0 ? 'text-accent-red' : ''">{{ <span [class]="balance() < 0 ? 'text-accent-red' : ''">{{ balance() | currency: 'EUR' : 'symbol' : '1.2-2' }}</span>
balance() | currency: 'EUR' : 'symbol' : '1.2-2'
}}</span>
</div> </div>
<button (click)="logout()" class="button-primary px-4 py-1.5">Abmelden</button> <button (click)="logout()" class="button-primary px-4 py-1.5">Abmelden</button>
} }