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