All files / app/components/edit-list-modal edit-list-modal.html

82.6% Statements 38/46
50% Branches 1/2
0% Functions 0/5
92.59% Lines 25/27

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 5815x     32x 32x 32x 15x       15x   15x 32x 15x         32x 15x             15x 32x 15x       32x 15x     15x       32x 32x 15x   15x 32x         32x 32x   15x      
<div class="modal-content">
  <!-- Header -->
  <div class="modal-header">
    <h2 class="modal-title">{{ 'modals.editList.title' | transloco }}</h2>
    <button type="button" class="close-btn" (click)="close()" [attr.aria-label]="'common.close' | transloco">
      <lucide-icon [img]="icons.X" [size]="24" [strokeWidth]="2"></lucide-icon>
    </button>
  </div>
 
  <!-- Form -->
  <form class="modal-form" (ngSubmit)="submit()">
    <!-- Listenname -->
    <div class="form-group">
      <label for="listName">{{ 'modals.editList.name' | transloco }}</label>
      <input
        type="text"
        id="listName"
        class="form-input"
        [attr.placeholder]="'modals.editList.namePlaceholder' | transloco"
        [ngModel]="name()"
        (ngModelChange)="name.set($event)"
        name="listName"
        required
      />
    </div>
 
    <!-- Beschreibung -->
    <div class="form-group">
      <label for="listDescription">{{ 'modals.editList.description' | transloco }}</label>
      <textarea
        id="listDescription"
        class="form-textarea"
        [attr.placeholder]="'modals.editList.descriptionPlaceholder' | transloco"
        [ngModel]="description()"
        (ngModelChange)="description.set($event)"
        name="listDescription"
        rows="3"
      ></textarea>
    </div>
 
    <!-- Submit Button -->
    <button type="submit" class="submit-btn" [disabled]="!name().trim()">
      {{ 'common.save' | transloco }}
    </button>
 
    <button type="button" class="delete-btn" (click)="deleteList()">
      @if(this.getAloneInList()) {
        <lucide-icon [img]="icons.Trash2" [size]="20" [strokeWidth]="2"></lucide-icon>
      {{ 'modals.editList.deleteList' | transloco }}
      }
       @else {
        <lucide-icon [img]="icons.UserX" [size]="20" [strokeWidth]="2"></lucide-icon>
      {{ 'modals.editList.leaveList' | transloco }}
      }
    </button>
  </form>
</div>