-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e5e84a
commit 82793f4
Showing
14 changed files
with
75 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { Component, input } from '@angular/core'; | ||
import { Board } from '@moby-it/poker-core'; | ||
import { CardComponent } from '../card/card.component'; | ||
|
||
@Component({ | ||
selector: 'ppo-board', | ||
imports: [CardComponent], | ||
template: ` | ||
@for (card of board; track card) { | ||
@for (card of board(); track card) { | ||
<ppo-card [card]="card"></ppo-card> | ||
} | ||
`, | ||
standalone: true | ||
}) | ||
export class BoardComponent { | ||
@Input() board!: Board; | ||
board = input<Board>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { Card } from '@moby-it/poker-core'; | ||
import { Component, input } from '@angular/core'; | ||
import { fadeAnimation } from '@app/shared/ui/animations/fadeIn'; | ||
import { Card } from '@moby-it/poker-core'; | ||
@Component({ | ||
selector: 'ppo-card', | ||
template: ` | ||
@if (back) { | ||
@if (back()) { | ||
<img src="/assets/cards/card_hidden.svg" @fade alt="" srcset="" /> | ||
} @else { | ||
<img src="/assets/cards/{{ card }}.svg" @fade alt="" srcset="" /> | ||
<img src="/assets/cards/{{ card() }}.svg" @fade alt="" srcset="" /> | ||
} | ||
`, | ||
animations: [fadeAnimation], | ||
standalone: true | ||
}) | ||
export class CardComponent { | ||
@Input() back = false; | ||
@Input() card: Card | undefined; | ||
back = input(false); | ||
card = input<Card>(); | ||
cardLink = '/assets/svg-cards.svg#'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/ui/src/app/round/poker-table/poker-table/poker-table.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/ui/src/app/round/poker-table/round-result/round-result.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 15 additions & 11 deletions
26
src/ui/src/app/round/poker-table/round-result/round-result.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,27 @@ | ||
import { CommonModule } from '@angular/common'; | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
import { Component, effect, input } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'ppo-round-result', | ||
templateUrl: './round-result.component.html', | ||
standalone: true, | ||
imports: [CommonModule] | ||
}) | ||
export class RoundResultComponent implements OnInit { | ||
export class RoundResultComponent { | ||
|
||
size = input('md'); | ||
header = input(); | ||
body = input(); | ||
classes = input<string[]>(); | ||
|
||
headerClass = 'lg'; | ||
bodyClass = 'sm'; | ||
@Input() size: 'lg' | 'md' = 'md'; | ||
@Input() header: string | number | undefined | null; | ||
@Input() body: string | number | undefined | null; | ||
@Input() classes: string[] = []; | ||
ngOnInit(): void { | ||
if (this.size === 'lg') { | ||
this.headerClass = 'xl'; | ||
this.bodyClass = 'md'; | ||
} | ||
constructor() { | ||
effect(() => { | ||
if (this.size() === 'lg') { | ||
this.headerClass = 'xl'; | ||
this.bodyClass = 'md'; | ||
} | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters