-
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
3bb21ba
commit b893b36
Showing
27 changed files
with
488 additions
and
133 deletions.
There are no files selected for viewing
File renamed without changes.
11 changes: 6 additions & 5 deletions
11
...ubmit-button/submit-button.component.html → ...ents/buttons/button/button.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
<button | ||
[disabled]="disabled" | ||
[ngClass]="{'bg-blue-700 hover:bg-blue-800 dark:bg-blue-600 dark:hover:bg-blue-700': !danger, | ||
'bg-red-700 hover:bg-red-800 dark:bg-red-600 dark:hover:bg-red-700': danger}" | ||
[disabled]="disabled()" | ||
[ngClass]="{'bg-blue-700 hover:bg-blue-800 dark:bg-blue-600 dark:hover:bg-blue-700': !danger(), | ||
'bg-red-700 hover:bg-red-800 dark:bg-red-600 dark:hover:bg-red-700': danger()}" | ||
[type]="type()" | ||
(click)="tap.emit()" | ||
class="w-full rounded-lg border border-transparent px-5 py-2.5 text-center text-sm font-medium | ||
text-white | ||
focus:outline-none | ||
disabled:cursor-not-allowed | ||
disabled:border-gray-200 disabled:bg-white disabled:text-gray-400 dark:bg-blue-600 | ||
dark:hover:bg-blue-700 dark:focus:ring-blue-800 | ||
disabled:dark:border-gray-400 disabled:dark:bg-gray-950 sm:w-auto" | ||
type="submit"> | ||
disabled:dark:border-gray-400 disabled:dark:bg-gray-950 sm:w-auto"> | ||
<ng-content></ng-content> | ||
</button> |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { ChangeDetectionStrategy, Component, EventEmitter, input, Output } from '@angular/core'; | ||
import { NgClass } from '@angular/common'; | ||
|
||
@Component({ | ||
selector: 'pap-button', | ||
standalone: true, | ||
imports: [NgClass], | ||
templateUrl: './button.component.html', | ||
styleUrl: './button.component.css', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class ButtonComponent { | ||
disabled = input(false); | ||
danger = input(false); | ||
type = input<'button' | 'submit'>('button'); | ||
@Output() tap = new EventEmitter(); | ||
} |
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
Empty file.
8 changes: 8 additions & 0 deletions
8
...s/character-statistics/character-main-statistics/character-main-statistics.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<pap-content-group [footer]="footer()" [formGroup]="formGroup()" title="Main Stats"> | ||
<pap-character-statistic [allowEdit]="allowEdit()" [remainingPoints]="remainingPoints()" formControlName="strength" label="Stärke" /> | ||
<pap-character-statistic [allowEdit]="allowEdit()" [remainingPoints]="remainingPoints()" formControlName="agility" label="Beweglichkeit" /> | ||
<pap-character-statistic [allowEdit]="allowEdit()" [remainingPoints]="remainingPoints()" formControlName="stamina" label="Ausdauer" /> | ||
<pap-character-statistic [allowEdit]="allowEdit()" [remainingPoints]="remainingPoints()" formControlName="magic" label="Magie" /> | ||
<pap-character-statistic [allowEdit]="allowEdit()" [remainingPoints]="remainingPoints()" formControlName="spirit" label="Geist" /> | ||
<pap-character-statistic [allowEdit]="allowEdit()" [remainingPoints]="remainingPoints()" formControlName="intelligence" label="Intelligenz" /> | ||
</pap-content-group> |
19 changes: 19 additions & 0 deletions
19
...ers/character-statistics/character-main-statistics/character-main-statistics.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { ChangeDetectionStrategy, Component, input } from '@angular/core'; | ||
import { CharacterStatisticComponent } from '../character-statistic/character-statistic.component'; | ||
import { ContentGroupComponent } from '../../../content-group/content-group.component'; | ||
import { FormGroup, ReactiveFormsModule } from '@angular/forms'; | ||
|
||
@Component({ | ||
selector: 'pap-character-main-statistics', | ||
standalone: true, | ||
imports: [CharacterStatisticComponent, ContentGroupComponent, ReactiveFormsModule], | ||
templateUrl: './character-main-statistics.component.html', | ||
styleUrl: './character-main-statistics.component.css', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class CharacterMainStatisticsComponent { | ||
formGroup = input.required<FormGroup>(); | ||
footer = input(''); | ||
remainingPoints = input(0); | ||
allowEdit = input(false); | ||
} |
File renamed without changes.
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
3 changes: 3 additions & 0 deletions
3
src/app/components/characters/character-statistics/character-statistics.component.css
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
:host { | ||
@apply block; | ||
} |
29 changes: 29 additions & 0 deletions
29
src/app/components/characters/character-statistics/character-statistics.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<section class="flex flex-col xl:flex-row xl:space-x-4"> | ||
<div class="flex w-full flex-col xl:w-2/5"> | ||
<pap-character-main-statistics | ||
[allowEdit]="mainAllowEdit()" | ||
[footer]="pointsToDistribute() > 0 ? 'Du kannst noch ' + mainRemainingPoints() + ' Statuspunkte verteilen.' : ''" | ||
[formGroup]="mainFormGroup()" | ||
[remainingPoints]="mainRemainingPoints()" /> | ||
|
||
@if (mainAllowEdit() && valueAllowEdit()) { | ||
<pap-content-group class="mt-4" title="Punkte tauschen"> | ||
<pap-button [disabled]="!canConvertToValuePoints()" (tap)="convertMainToValuePoint()" | ||
>1 Statuspunkt in 3 Wertepunkte tauschen</pap-button | ||
> | ||
<pap-button [disabled]="!canConverToMainPoint()" (tap)="convertValueToMainPoint()" | ||
>3 Wertepunkte in 1 Statuspunkt tauschen</pap-button | ||
> | ||
</pap-content-group> | ||
} | ||
</div> | ||
|
||
<div class="mt-4 w-full xl:mt-0 xl:w-3/5"> | ||
<pap-character-value-statistics | ||
[allowEdit]="valueAllowEdit()" | ||
[calculatedValueStatistics]="calculatedValueStatistics()" | ||
[formGroup]="valueFormGroup()" | ||
[remainingPoints]="valueRemainingPoints()" | ||
[footer]="pointsToDistribute() > 0 ? 'Du kannst noch ' + valueRemainingPoints() + ' Wertepunkte verteilen.' : ''" /> | ||
</div> | ||
</section> |
Oops, something went wrong.