]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/overview/videos/video-list.component.html
Add ability to run transcoding jobs
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / overview / videos / video-list.component.html
index 6250c00fb862b4d2010e73570cb1496adc794ebc..738bcedeeeb5d1c23cda8cb8b76abda659627dc4 100644 (file)
@@ -10,6 +10,7 @@
   [showCurrentPageReport]="true" i18n-currentPageReportTemplate
   currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} videos"
   (onPage)="onPage($event)" [expandedRowKeys]="expandedRows"
+  [ngClass]="{ loading: loading }"
 >
   <ng-template pTemplate="caption">
     <div class="caption">
@@ -37,6 +38,7 @@
       <th style="width: 60px;"></th>
       <th i18n>Video</th>
       <th i18n>Info</th>
+      <th i18n>Files</th>
       <th style="width: 150px;" i18n pSortableColumn="publishedAt">Published <p-sortIcon field="publishedAt"></p-sortIcon></th>
     </tr>
   </ng-template>
@@ -54,8 +56,8 @@
 
       <td class="action-cell">
         <my-video-actions-dropdown
-          placement="bottom auto" buttonDirection="horizontal" [buttonStyled]="true" [video]="video"
-          [displayOptions]="videoActionsOptions" (videoRemoved)="onVideoRemoved()"
+          placement="bottom auto" buttonDirection="horizontal" [buttonStyled]="true" [video]="video" [displayOptions]="videoActionsOptions"
+          (videoRemoved)="reloadData()" (videoFilesRemoved)="reloadData()" (transcodingCreated)="reloadData()"
         ></my-video-actions-dropdown>
       </td>
 
         <my-video-cell [video]="video"></my-video-cell>
       </td>
 
-      <td class="badges">
-        <span [ngClass]="getPrivacyBadgeClass(video.privacy.id)" class="badge" i18n>{{ video.privacy.label }}</span>
+      <td>
+        <span class="badge badge-blue" *ngIf="video.isLocal">Local</span>
+        <span class="badge badge-purple" *ngIf="!video.isLocal">Remote</span>
+
+        <span [ngClass]="getPrivacyBadgeClass(video)" class="badge">{{ video.privacy.label }}</span>
 
         <span *ngIf="video.nsfw" class="badge badge-red" i18n>NSFW</span>
 
-        <span *ngIf="isUnpublished(video.state.id)" class="badge badge-yellow" i18n>Not published yet</span>
+        <span *ngIf="isUnpublished(video)" class="badge badge-yellow" i18n>{{ video.state.label }}</span>
 
         <span *ngIf="isAccountBlocked(video)" class="badge badge-red" i18n>Account muted</span>
         <span *ngIf="isServerBlocked(video)" class="badge badge-red" i18n>Server muted</span>
         <span *ngIf="isVideoBlocked(video)" class="badge badge-red" i18n>Blocked</span>
       </td>
 
+      <td>
+        <span *ngIf="isHLS(video)" class="badge badge-blue">HLS</span>
+        <span *ngIf="isWebTorrent(video)" class="badge badge-blue">WebTorrent</span>
+        <span *ngIf="video.isLive" class="badge badge-blue">Live</span>
+
+        <span *ngIf="!isImport(video) && !video.isLive && video.isLocal">{{ getFilesSize(video) | bytes: 1 }}</span>
+      </td>
+
       <td>
         {{ video.publishedAt | date: 'short' }}
       </td>
 
   <ng-template pTemplate="rowexpansion" let-video>
     <tr>
-      <td colspan="50">
-        <my-embed [video]="video"></my-embed>
+      <td class="video-info expand-cell" colspan="7">
+        <div>
+          <div *ngIf="isWebTorrent(video)">
+            WebTorrent:
+
+            <ul>
+              <li *ngFor="let file of video.files">
+                {{ file.resolution.label }}: {{ file.size | bytes: 1 }}
+              </li>
+            </ul>
+          </div>
+
+          <div *ngIf="isHLS(video)">
+            HLS:
+
+            <ul>
+              <li *ngFor="let file of video.streamingPlaylists[0].files">
+                {{ file.resolution.label }}: {{ file.size | bytes: 1 }}
+              </li>
+            </ul>
+          </div>
+
+          <my-embed class="ml-auto" [video]="video"></my-embed>
+        </div>
       </td>
     </tr>
   </ng-template>
 </p-table>
+
+<my-video-block #videoBlockModal (videoBlocked)="reloadData()"></my-video-block>