| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368 |
- <div class="dimensions">
- <div class="title">
- @if (isUpdate) {
- {{ "weapons.modal.editWeapon" | translate }}
- } @else {
- {{ "weapons.modal.addWeapon" | translate }}
- }
- </div>
- <div class="content b-0">
- <div class="input-label">{{ "weapons.name" | translate }}</div>
- <mat-form-field appearance="outline" class="w-100">
- <input matInput [(ngModel)]="name" />
- </mat-form-field>
- <hr />
- <div class="flex-row t-1">
- <div class="checkbox-column">
- <div class="checkbox-row">
- <input id="proficient" type="checkbox" [(ngModel)]="proficient" />
- <label for="proficient">{{ "weapons.proficient" | translate }}</label>
- </div>
- <div class="checkbox-row">
- <input
- id="useAttributeModifier"
- type="checkbox"
- [(ngModel)]="useAttributeModifier"
- />
- <label for="useAttributeModifier">{{
- "weapons.modal.applyModifier" | translate
- }}</label>
- </div>
- <div class="checkbox-row">
- <input id="finesse" type="checkbox" [(ngModel)]="isFinesse" />
- <label for="finesse">{{ "weapons.finesse" | translate }}</label>
- </div>
- <div class="checkbox-row">
- <input id="versatile" type="checkbox" [(ngModel)]="isVersatile" />
- <label for="versatile">{{ "weapons.versatile" | translate }}</label>
- </div>
- <div class="checkbox-row">
- <input id="isTwohanded" type="checkbox" [(ngModel)]="isTwoHanded" />
- <label for="isTwohanded">{{ "weapons.twoHanded" | translate }}</label>
- </div>
- </div>
- <div class="checkbox-column">
- <div class="checkbox-row">
- <input id="hasReach" type="checkbox" [(ngModel)]="hasReach" />
- <label for="hasReach">{{ "weapons.range" | translate }}</label>
- </div>
- <div class="checkbox-row">
- <input id="isRanged" type="checkbox" [(ngModel)]="isRanged" />
- <label for="isRanged">{{ "weapons.ranged" | translate }}</label>
- </div>
- <div class="checkbox-row">
- <input id="canBeThrown" type="checkbox" [(ngModel)]="canBeThrown" />
- <label for="canBeThrown">{{ "weapons.throwable" | translate }}</label>
- </div>
- <div class="checkbox-row">
- <input id="isMagical" type="checkbox" [(ngModel)]="isMagical" />
- <label for="isMagical">{{ "weapons.magical" | translate }}</label>
- </div>
- <div class="checkbox-row">
- <input
- id="additionalDamage"
- type="checkbox"
- [(ngModel)]="hasAdditionalDamage"
- />
- <label for="additionalDamage">{{
- "weapons.modal.additionalDamage" | translate
- }}</label>
- </div>
- </div>
- </div>
- <hr />
- <!-- TAB-PANEL -->
- <div class="d-flex">
- <div
- ngbNav
- #nav="ngbNav"
- [(activeId)]="active"
- class="flex-column navigation-bar"
- orientation="vertical"
- >
- <ng-container ngbNavItem="damage">
- <button ngbNavLink>Schaden</button>
- <ng-template ngbNavContent>
- <div class="flex-row">
- <div class="w-50">
- <div class="input-label">
- {{ "weapons.modal.attackBonus" | translate }}
- </div>
- <mat-form-field appearance="outline">
- <mat-select [(ngModel)]="attackBonus">
- @for (attackBonus of attackBonuses; track attackBonus) {
- <mat-option [value]="attackBonus">{{
- attackBonus
- }}</mat-option>
- }
- </mat-select>
- </mat-form-field>
- </div>
- @if (isMagical) {
- <div>
- <div class="input-label">
- {{ "weapons.modal.magicalModifier" | translate }}
- </div>
- <mat-form-field appearance="outline">
- <mat-select [(ngModel)]="magicBonus">
- @for (magicBonus of [1, 2, 3, 4, 5]; track magicBonus) {
- <mat-option [value]="magicBonus">
- +{{ magicBonus }}
- </mat-option>
- }
- </mat-select>
- </mat-form-field>
- </div>
- }
- </div>
- <div class="flex-row t-05">
- @for (
- damageEntry of damage;
- let index = $index;
- track damageEntry
- ) {
- <div class="damage-box">
- <div class="subheading left t-025">
- @if (index == 0) {
- {{ "weapons.modal.damage" | translate }}
- } @else {
- {{ "weapons.modal.additionalDamage" | translate }}
- }
- </div>
- <div class="input-label">
- {{ "general.diceNumber" | translate }}
- </div>
- <mat-form-field appearance="outline">
- <mat-select [(ngModel)]="damageEntry.diceNumber">
- @for (number of numbers; track number) {
- <mat-option [value]="number"> {{ number }} </mat-option>
- }
- </mat-select>
- </mat-form-field>
- <div class="input-label t-05">
- {{ "general.diceType" | translate }}
- @if (isVersatile && index === 0) {
- ({{ "weapons.oneHanded" | translate }})
- }
- </div>
- <mat-form-field appearance="outline">
- <mat-select [(ngModel)]="damageEntry.diceType">
- @for (die of dice; track die) {
- <mat-option [value]="die">
- {{ "general.dice" | translate }}{{ die }}
- </mat-option>
- }
- </mat-select>
- </mat-form-field>
- @if (isVersatile && index === 0) {
- <div class="input-label t-05">
- {{ "general.diceType" | translate }} ({{
- "weapons.twoHanded" | translate
- }})
- </div>
- <mat-form-field appearance="outline">
- <mat-select [(ngModel)]="versatileDamage">
- @for (die of dice; track die) {
- <mat-option [value]="die">
- {{ "general.dice" | translate }}{{ die }}
- </mat-option>
- }
- </mat-select>
- </mat-form-field>
- }
- <div class="input-label t-05">
- {{ "general.damageType" | translate }}
- </div>
- <mat-form-field appearance="outline">
- <mat-select [(ngModel)]="damageEntry.damageType">
- @for (type of damageTypes; track type) {
- <mat-option [value]="type">
- {{ "damageTypes." + type | translate }}
- </mat-option>
- }
- </mat-select>
- </mat-form-field>
- @if (index !== 0) {
- <icon-button
- [icon]="'delete'"
- (click)="removeDamage(index)"
- ></icon-button>
- } @else if (hasAdditionalDamage) {
- <div class="input-label t-05">
- {{ "weapons.modal.additionalDamage" | translate }}
- </div>
- <mat-form-field appearance="outline">
- <mat-select [(ngModel)]="additionalDamage">
- @for (damage of additonalDamages; track damage) {
- <mat-option [value]="damage">
- +{{ damage }}
- </mat-option>
- }
- </mat-select>
- </mat-form-field>
- }
- </div>
- @if (damage.length < 2) {
- <icon-button
- [icon]="'add'"
- style="margin-top: 7rem; margin-left: 5rem"
- (click)="addDamage()"
- ></icon-button>
- }
- }
- </div>
- </ng-template>
- </ng-container>
- <ng-container ngbNavItem="range">
- @if (isRanged || canBeThrown) {
- <button ngbNavLink>{{ "weapons.range" | translate }}</button>
- } @else {
- <button class="disabled-button" disabled>
- {{ "weapons.range" | translate }}
- </button>
- }
- <ng-template ngbNavContent>
- <div class="numbers">
- @if (isRanged) {
- <div class="flex-row t-1">
- <div class="w-50">
- <div class="input-label">
- {{ "weapons.modal.normalRange" | translate }}
- </div>
- <mat-form-field appearance="outline">
- <input
- class="right"
- type="number"
- matInput
- [(ngModel)]="range[0]"
- />
- <span class="input-value" matTextSuffix>{{
- "general.feet" | translate
- }}</span>
- </mat-form-field>
- </div>
- <div>
- <div class="input-label">
- {{ "weapons.modal.extendedRange" | translate }}
- </div>
- <mat-form-field appearance="outline">
- <input
- class="right"
- type="number"
- matInput
- [(ngModel)]="range[1]"
- />
- <span class="input-value" matTextSuffix>{{
- "general.feet" | translate
- }}</span>
- </mat-form-field>
- </div>
- </div>
- }
- @if (canBeThrown) {
- <div class="flex-row t-2">
- <div class="w-50">
- <div class="input-label">
- {{ "weapons.modal.normalThrowRange" | translate }}
- </div>
- <mat-form-field appearance="outline">
- <input
- class="right"
- type="number"
- matInput
- [(ngModel)]="throwRange[0]"
- />
- <span class="input-value" matTextSuffix>{{
- "general.feet" | translate
- }}</span>
- </mat-form-field>
- </div>
- <div>
- <div class="input-label">
- {{ "weapons.modal.extendedThrowRange" | translate }}
- </div>
- <mat-form-field appearance="outline">
- <input
- class="right"
- type="number"
- matInput
- [(ngModel)]="throwRange[1]"
- />
- <span class="input-value" matTextSuffix>{{
- "general.feet" | translate
- }}</span>
- </mat-form-field>
- </div>
- </div>
- }
- </div>
- </ng-template>
- </ng-container>
- <ng-container ngbNavItem="description">
- <button ngbNavLink>{{ "general.description" | translate }}</button>
- <ng-template ngbNavContent>
- <div class="NgxEditor__Wrapper">
- <ngx-editor-menu [editor]="editor" [toolbar]="toolbar">
- </ngx-editor-menu>
- <ngx-editor
- [editor]="editor"
- [(ngModel)]="description"
- [placeholder]="'weapons.modal.placeholder' | translate"
- ></ngx-editor>
- </div>
- </ng-template>
- </ng-container>
- </div>
- <div
- [ngbNavOutlet]="nav"
- style="
- width: 100%;
- min-height: 20rem;
- max-height: 26rem;
- overflow-y: auto;
- overflow-x: hidden;
- "
- class="ms-4"
- ></div>
- </div>
- <hr style="margin-bottom: 0" />
- </div>
- <div class="horizontal-buttons">
- @if (isUpdate) {
- <ui-button
- [color]="'green'"
- [type]="'confirm'"
- style="width: 40%"
- (click)="update()"
- >
- </ui-button>
- } @else {
- <ui-button
- [color]="'green'"
- [type]="'add'"
- style="width: 40%"
- (click)="add()"
- >
- </ui-button>
- }
- <ui-button
- [color]="'red'"
- [type]="'cancel'"
- style="width: 40%"
- (click)="cancel()"
- >
- </ui-button>
- </div>
- </div>
|