]>
Commit | Line | Data |
---|---|---|
33f6dce1 C |
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 | |
0667dbaf C |
7 | [value]="videos" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [first]="pagination.start" |
8 | [rowsPerPageOptions]="rowsPerPageOptions" [sortField]="sort.field" [sortOrder]="sort.order" dataKey="id" [resizableColumns]="true" | |
cd940f40 | 9 | [(selection)]="selectedRows" [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false" [selectionPageOnly]="true" |
33f6dce1 C |
10 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate |
11 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} videos" | |
e6492b2d | 12 | [expandedRowKeys]="expandedRows" [ngClass]="{ loading: loading }" |
33f6dce1 C |
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" | |
cd940f40 | 19 | [actions]="bulkActions" [entry]="selectedRows" |
33f6dce1 C |
20 | > |
21 | </my-action-dropdown> | |
22 | </div> | |
23 | ||
4c8749cb | 24 | <div class="ms-auto right-form"> |
33f6dce1 | 25 | <my-advanced-input-filter [filters]="inputFilters" (search)="onSearch($event)"></my-advanced-input-filter> |
038e1f3d | 26 | |
fbd573e5 | 27 | <my-button i18n-label label="Refresh" icon="refresh" (click)="reloadData()"></my-button> |
33f6dce1 C |
28 | </div> |
29 | ||
30 | </div> | |
31 | </ng-template> | |
32 | ||
33 | <ng-template pTemplate="header"> | |
34 | <tr> | |
35 | <th style="width: 40px"> | |
36 | <p-tableHeaderCheckbox ariaLabel="Select all rows" i18n-ariaLabel></p-tableHeaderCheckbox> | |
37 | </th> | |
38 | <th style="width: 40px"></th> | |
39 | <th style="width: 60px;"></th> | |
40 | <th i18n>Video</th> | |
41 | <th i18n>Info</th> | |
3c10840f | 42 | <th i18n>Files</th> |
33f6dce1 C |
43 | <th style="width: 150px;" i18n pSortableColumn="publishedAt">Published <p-sortIcon field="publishedAt"></p-sortIcon></th> |
44 | </tr> | |
45 | </ng-template> | |
46 | ||
47 | <ng-template pTemplate="body" let-expanded="expanded" let-video> | |
48 | ||
49 | <tr [pSelectableRow]="video"> | |
50 | <td class="checkbox-cell"> | |
51 | <p-tableCheckbox [value]="video" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox> | |
52 | </td> | |
53 | ||
54 | <td class="expand-cell" [pRowToggler]="video"> | |
55 | <my-table-expander-icon [expanded]="expanded"></my-table-expander-icon> | |
56 | </td> | |
57 | ||
58 | <td class="action-cell"> | |
59 | <my-video-actions-dropdown | |
ad5db104 C |
60 | placement="bottom auto" buttonDirection="horizontal" [buttonStyled]="true" [video]="video" [displayOptions]="videoActionsOptions" |
61 | (videoRemoved)="reloadData()" (videoFilesRemoved)="reloadData()" (transcodingCreated)="reloadData()" | |
33f6dce1 C |
62 | ></my-video-actions-dropdown> |
63 | </td> | |
64 | ||
65 | <td> | |
66 | <my-video-cell [video]="video"></my-video-cell> | |
67 | </td> | |
68 | ||
3c10840f | 69 | <td> |
4c8749cb C |
70 | <span class="pt-badge badge-blue" *ngIf="video.isLocal">Local</span> |
71 | <span class="pt-badge badge-purple" *ngIf="!video.isLocal">Remote</span> | |
4bdff96d | 72 | |
4c8749cb | 73 | <span [ngClass]="getPrivacyBadgeClass(video)" class="pt-badge">{{ video.privacy.label }}</span> |
2760b454 | 74 | |
4c8749cb | 75 | <span *ngIf="video.nsfw" class="pt-badge badge-red" i18n>NSFW</span> |
2760b454 | 76 | |
4c8749cb | 77 | <span *ngIf="isUnpublished(video)" class="pt-badge badge-yellow" i18n>{{ video.state.label }}</span> |
2760b454 | 78 | |
4c8749cb C |
79 | <span *ngIf="isAccountBlocked(video)" class="pt-badge badge-red" i18n>Account muted</span> |
80 | <span *ngIf="isServerBlocked(video)" class="pt-badge badge-red" i18n>Server muted</span> | |
2760b454 | 81 | |
4c8749cb | 82 | <span *ngIf="isVideoBlocked(video)" class="pt-badge badge-red" i18n>Blocked</span> |
33f6dce1 C |
83 | </td> |
84 | ||
3c10840f | 85 | <td> |
4c8749cb C |
86 | <span *ngIf="isHLS(video)" class="pt-badge badge-blue">HLS</span> |
87 | <span *ngIf="isWebTorrent(video)" class="pt-badge badge-blue">WebTorrent ({{ video.files.length }})</span> | |
46242830 C |
88 | <span i18n *ngIf="video.isLive" class="pt-badge badge-blue">Live</span> |
89 | <span i18n *ngIf="hasObjectStorage(video)" class="pt-badge badge-purple">Object storage</span> | |
3c10840f | 90 | |
d324756e | 91 | <span *ngIf="!isImport(video) && !video.isLive && video.isLocal">{{ getFilesSize(video) | bytes: 1 }}</span> |
3c10840f C |
92 | </td> |
93 | ||
33f6dce1 C |
94 | <td> |
95 | {{ video.publishedAt | date: 'short' }} | |
96 | </td> | |
97 | ||
98 | </tr> | |
99 | </ng-template> | |
100 | ||
101 | <ng-template pTemplate="rowexpansion" let-video> | |
102 | <tr> | |
3c10840f C |
103 | <td class="video-info expand-cell" colspan="7"> |
104 | <div> | |
105 | <div *ngIf="isWebTorrent(video)"> | |
106 | WebTorrent: | |
107 | ||
108 | <ul> | |
109 | <li *ngFor="let file of video.files"> | |
1a3b53de | 110 | <a target="_blank" rel="noopener noreferrer" [href]="file.fileUrl">{{ file.resolution.label }}</a>: {{ file.size | bytes: 1 }} |
1bb4c9ab C |
111 | |
112 | <my-global-icon | |
367a9dc6 | 113 | *ngIf="canRemoveOneFile(video)" |
1bb4c9ab C |
114 | i18n-ngbTooltip ngbTooltip="Delete this file" iconName="delete" role="button" |
115 | (click)="removeVideoFile(video, file, 'webtorrent')" | |
116 | ></my-global-icon> | |
3c10840f C |
117 | </li> |
118 | </ul> | |
119 | </div> | |
120 | ||
121 | <div *ngIf="isHLS(video)"> | |
122 | HLS: | |
123 | ||
124 | <ul> | |
125 | <li *ngFor="let file of video.streamingPlaylists[0].files"> | |
1a3b53de | 126 | <a target="_blank" rel="noopener noreferrer" [href]="file.fileUrl">{{ file.resolution.label }}</a>: {{ file.size | bytes: 1 }} |
1bb4c9ab C |
127 | |
128 | <my-global-icon | |
367a9dc6 | 129 | *ngIf="canRemoveOneFile(video)" |
1bb4c9ab C |
130 | i18n-ngbTooltip ngbTooltip="Delete this file" iconName="delete" role="button" |
131 | (click)="removeVideoFile(video, file, 'hls')" | |
132 | ></my-global-icon> | |
3c10840f C |
133 | </li> |
134 | </ul> | |
135 | </div> | |
136 | ||
4c8749cb | 137 | <my-embed class="ms-auto" [video]="video"></my-embed> |
3c10840f | 138 | </div> |
33f6dce1 C |
139 | </td> |
140 | </tr> | |
141 | </ng-template> | |
142 | </p-table> | |
3cfa8176 | 143 | |
b46cf4b9 | 144 | <my-video-block #videoBlockModal (videoBlocked)="reloadData()"></my-video-block> |