aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/account/account-videos/account-videos.component.html
blob: 030c2f19c6244a39c10b7e2799b04de126f8e4e9 (plain) (blame)
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
<div
  infiniteScroll
  [infiniteScrollDistance]="0.5"
  [infiniteScrollUpDistance]="1.5"
  (scrolled)="onNearOfBottom()"
  (scrolledUp)="onNearOfTop()"
>
  <div class="video" *ngFor="let video of videos; let i = index">
    <input type="checkbox" [(ngModel)]="checkedVideos[video.id]" />

    <my-video-thumbnail [video]="video"></my-video-thumbnail>

    <div class="video-info">
      <div class="video-info-name">{{ video.name }}</div>
      <span class="video-info-date-views">{{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views</span>
    </div>

    <!-- Display only once -->
    <div class="action-selection-mode" *ngIf="isInSelectionMode() === true && i === 0">
      <div class="action-selection-mode-child">
        <span class="action-button" (click)="abortSelectionMode()">
          Cancel
        </span>

            <span class="action-button action-button-delete-selection" (click)="deleteSelectedVideos()">
          <span class="icon icon-delete-white"></span>
          Delete
        </span>
      </div>
    </div>

    <ng-template [ngIf]="isInSelectionMode() === false">
      <span class="action-button action-button-delete" (click)="deleteVideo(video)">
        <span class="icon icon-delete-grey"></span>
        Delete
      </span>

      <a class="action-button" [routerLink]="[ '/videos', 'edit', video.uuid ]">
        <span class="icon icon-edit"></span>
        Edit
      </a>
    </ng-template>
  </div>
</div>