]>
Commit | Line | Data |
---|---|---|
1 | <h1> | |
2 | <my-global-icon iconName="videos" aria-hidden="true"></my-global-icon> | |
3 | <ng-container i18n>Videos</ng-container> | |
4 | </h1> | |
5 | ||
6 | <p-table | |
7 | [value]="videos" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" | |
8 | [sortField]="sort.field" [sortOrder]="sort.order" dataKey="id" [resizableColumns]="true" [(selection)]="selectedVideos" | |
9 | [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false" [selectionPageOnly]="true" | |
10 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate | |
11 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} videos" | |
12 | [expandedRowKeys]="expandedRows" [ngClass]="{ loading: loading }" | |
13 | > | |
14 | <ng-template pTemplate="caption"> | |
15 | <div class="caption"> | |
16 | <div class="left-buttons"> | |
17 | <my-action-dropdown | |
18 | *ngIf="isInSelectionMode()" i18n-label label="Batch actions" theme="orange" | |
19 | [actions]="bulkVideoActions" [entry]="selectedVideos" | |
20 | > | |
21 | </my-action-dropdown> | |
22 | </div> | |
23 | ||
24 | <div class="ml-auto"> | |
25 | <my-advanced-input-filter [filters]="inputFilters" (search)="onSearch($event)"></my-advanced-input-filter> | |
26 | </div> | |
27 | ||
28 | </div> | |
29 | </ng-template> | |
30 | ||
31 | <ng-template pTemplate="header"> | |
32 | <tr> | |
33 | <th style="width: 40px"> | |
34 | <p-tableHeaderCheckbox ariaLabel="Select all rows" i18n-ariaLabel></p-tableHeaderCheckbox> | |
35 | </th> | |
36 | <th style="width: 40px"></th> | |
37 | <th style="width: 60px;"></th> | |
38 | <th i18n>Video</th> | |
39 | <th i18n>Info</th> | |
40 | <th i18n>Files</th> | |
41 | <th style="width: 150px;" i18n pSortableColumn="publishedAt">Published <p-sortIcon field="publishedAt"></p-sortIcon></th> | |
42 | </tr> | |
43 | </ng-template> | |
44 | ||
45 | <ng-template pTemplate="body" let-expanded="expanded" let-video> | |
46 | ||
47 | <tr [pSelectableRow]="video"> | |
48 | <td class="checkbox-cell"> | |
49 | <p-tableCheckbox [value]="video" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox> | |
50 | </td> | |
51 | ||
52 | <td class="expand-cell" [pRowToggler]="video"> | |
53 | <my-table-expander-icon [expanded]="expanded"></my-table-expander-icon> | |
54 | </td> | |
55 | ||
56 | <td class="action-cell"> | |
57 | <my-video-actions-dropdown | |
58 | placement="bottom auto" buttonDirection="horizontal" [buttonStyled]="true" [video]="video" [displayOptions]="videoActionsOptions" | |
59 | (videoRemoved)="reloadData()" (videoFilesRemoved)="reloadData()" (transcodingCreated)="reloadData()" | |
60 | ></my-video-actions-dropdown> | |
61 | </td> | |
62 | ||
63 | <td> | |
64 | <my-video-cell [video]="video"></my-video-cell> | |
65 | </td> | |
66 | ||
67 | <td> | |
68 | <span class="badge badge-blue" *ngIf="video.isLocal">Local</span> | |
69 | <span class="badge badge-purple" *ngIf="!video.isLocal">Remote</span> | |
70 | ||
71 | <span [ngClass]="getPrivacyBadgeClass(video)" class="badge">{{ video.privacy.label }}</span> | |
72 | ||
73 | <span *ngIf="video.nsfw" class="badge badge-red" i18n>NSFW</span> | |
74 | ||
75 | <span *ngIf="isUnpublished(video)" class="badge badge-yellow" i18n>{{ video.state.label }}</span> | |
76 | ||
77 | <span *ngIf="isAccountBlocked(video)" class="badge badge-red" i18n>Account muted</span> | |
78 | <span *ngIf="isServerBlocked(video)" class="badge badge-red" i18n>Server muted</span> | |
79 | ||
80 | <span *ngIf="isVideoBlocked(video)" class="badge badge-red" i18n>Blocked</span> | |
81 | </td> | |
82 | ||
83 | <td> | |
84 | <span *ngIf="isHLS(video)" class="badge badge-blue">HLS</span> | |
85 | <span *ngIf="isWebTorrent(video)" class="badge badge-blue">WebTorrent</span> | |
86 | <span *ngIf="video.isLive" class="badge badge-blue">Live</span> | |
87 | ||
88 | <span *ngIf="!isImport(video) && !video.isLive && video.isLocal">{{ getFilesSize(video) | bytes: 1 }}</span> | |
89 | </td> | |
90 | ||
91 | <td> | |
92 | {{ video.publishedAt | date: 'short' }} | |
93 | </td> | |
94 | ||
95 | </tr> | |
96 | </ng-template> | |
97 | ||
98 | <ng-template pTemplate="rowexpansion" let-video> | |
99 | <tr> | |
100 | <td class="video-info expand-cell" colspan="7"> | |
101 | <div> | |
102 | <div *ngIf="isWebTorrent(video)"> | |
103 | WebTorrent: | |
104 | ||
105 | <ul> | |
106 | <li *ngFor="let file of video.files"> | |
107 | {{ file.resolution.label }}: {{ file.size | bytes: 1 }} | |
108 | </li> | |
109 | </ul> | |
110 | </div> | |
111 | ||
112 | <div *ngIf="isHLS(video)"> | |
113 | HLS: | |
114 | ||
115 | <ul> | |
116 | <li *ngFor="let file of video.streamingPlaylists[0].files"> | |
117 | {{ file.resolution.label }}: {{ file.size | bytes: 1 }} | |
118 | </li> | |
119 | </ul> | |
120 | </div> | |
121 | ||
122 | <my-embed class="ml-auto" [video]="video"></my-embed> | |
123 | </div> | |
124 | </td> | |
125 | </tr> | |
126 | </ng-template> | |
127 | </p-table> | |
128 | ||
129 | <my-video-block #videoBlockModal (videoBlocked)="reloadData()"></my-video-block> |