style: fix formatting and add missing commas in code
All checks were successful
CI / Get Changed Files (pull_request) Successful in 18s
CI / Checkstyle Main (pull_request) Has been skipped
CI / Docker backend validation (pull_request) Successful in 15s
CI / Docker frontend validation (pull_request) Successful in 52s
CI / oxlint (pull_request) Successful in 29s
CI / eslint (pull_request) Successful in 38s
CI / prettier (pull_request) Successful in 30s
CI / test-build (pull_request) Successful in 46s

This commit is contained in:
Jan-Marlon Leibl 2025-05-07 15:30:40 +02:00
commit c92a182123
Signed by: jleibl
GPG key ID: 300B2F906DC6F1D5
6 changed files with 21 additions and 21 deletions

View file

@ -33,7 +33,7 @@ export default class LootboxOpeningComponent {
private cdr: ChangeDetectorRef
) {
this.loadLootbox();
this.userService.currentUser$.subscribe(user => {
this.userService.currentUser$.subscribe((user) => {
this.currentUser = user;
this.cdr.detectChanges();
});
@ -64,7 +64,7 @@ export default class LootboxOpeningComponent {
openLootbox(): void {
if (!this.lootbox || this.isOpening) return;
// Check if user has enough balance
if (!this.hasEnoughBalance()) {
this.error = 'Nicht genug Guthaben, um diese Lootbox zu öffnen.';
@ -78,7 +78,7 @@ export default class LootboxOpeningComponent {
}
this.resetState(true);
if (this.lootbox.price) {
this.userService.updateLocalBalance(-this.lootbox.price);
}
@ -96,7 +96,7 @@ export default class LootboxOpeningComponent {
this.generateCasePrizes(reward);
this.isOpening = false;
this.isOpen = true;
this.cdr.detectChanges();
}
@ -105,7 +105,7 @@ export default class LootboxOpeningComponent {
const rewards = this.lootbox.rewards;
const fallback = rewards[Math.floor(Math.random() * rewards.length)];
this.wonReward = fallback;
this.generateCasePrizes(fallback);
this.isOpening = false;
@ -142,11 +142,11 @@ export default class LootboxOpeningComponent {
setTimeout(() => {
this.animationCompleted = true;
if (this.wonReward) {
this.userService.updateLocalBalance(this.wonReward.value);
}
this.userService.refreshCurrentUser();
this.cdr.detectChanges();
}, 10000);