ability-modal.component.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <div class="dimensions">
  2. <div class="title">
  3. @if (isUpdate && !isAddedFromCharacter) {
  4. {{ "abilities.modal.editAbility" | translate }}
  5. } @else {
  6. {{ "abilities.modal.addAbility" | translate }}
  7. }
  8. </div>
  9. <div class="flex-form t-15">
  10. <div>
  11. <div class="input-label">{{ "modal.name" | translate }}</div>
  12. <mat-form-field appearance="outline" class="w-50">
  13. <input matInput [(ngModel)]="name" />
  14. </mat-form-field>
  15. </div>
  16. <div>
  17. <div class="input-label">{{ "modal.shortDescription" | translate }}</div>
  18. <div class="NgxEditor__Wrapper">
  19. <ngx-editor-menu [editor]="shortEditor" [toolbar]="toolbar">
  20. </ngx-editor-menu>
  21. <ngx-editor
  22. [editor]="shortEditor"
  23. [(ngModel)]="shortDescription"
  24. [placeholder]="'abilities.modal.shortPlaceholder' | translate"
  25. ></ngx-editor>
  26. </div>
  27. <div class="hint">{{ "modal.shortHint" | translate }}</div>
  28. </div>
  29. <div>
  30. <div class="input-label">{{ "modal.longDescription" | translate }}</div>
  31. <div class="NgxEditor__Wrapper">
  32. <ngx-editor-menu [editor]="longEditor" [toolbar]="toolbar">
  33. </ngx-editor-menu>
  34. <ngx-editor
  35. [editor]="longEditor"
  36. [(ngModel)]="longDescription"
  37. [placeholder]="'abilities.modal.shortPlaceholder' | translate"
  38. ></ngx-editor>
  39. </div>
  40. <div class="hint">{{ "modal.longHint" | translate }}</div>
  41. </div>
  42. <div class="row">
  43. <div class="w-100">
  44. <div class="input-label">{{ "modal.cost" | translate }}</div>
  45. <mat-form-field appearance="outline" class="w-100">
  46. <!-- <mat-label>Kosten</mat-label> -->
  47. <mat-select [(ngModel)]="cost">
  48. @for (cost of costs; track cost) {
  49. <mat-option [value]="cost">{{
  50. "time." + cost | translate
  51. }}</mat-option>
  52. }
  53. </mat-select>
  54. </mat-form-field>
  55. </div>
  56. <div class="w-100">
  57. <div class="input-label">{{ "modal.uses" | translate }}</div>
  58. <mat-form-field appearance="outline" class="w-100">
  59. <!-- <mat-label>Nutzungen</mat-label> -->
  60. <mat-select [(ngModel)]="charges">
  61. @for (charge of chargesArray; track charge) {
  62. <mat-option [value]="charge">
  63. @if (charge === 0) {
  64. {{ "uses." + charge | translate }}
  65. } @else {
  66. {{ charge }}
  67. }
  68. </mat-option>
  69. }
  70. </mat-select>
  71. </mat-form-field>
  72. </div>
  73. </div>
  74. <div class="horizontal-buttons">
  75. @if (isUpdate && !isAddedFromCharacter) {
  76. <ui-button
  77. [color]="'green'"
  78. [type]="'apply'"
  79. style="width: 45%"
  80. (click)="update()"
  81. ></ui-button>
  82. } @else {
  83. <ui-button style="width: 45%" (click)="add()"
  84. >{{ "buttons.add" | translate }}
  85. </ui-button>
  86. }
  87. <ui-button style="width: 45%" (click)="cancel()"
  88. >{{ "buttons.cancel" | translate }}
  89. </ui-button>
  90. </div>
  91. </div>
  92. </div>