]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+videos/+video-watch/video-watch.component.html
Added label on the next autoplayed video and hide the hr line if unnecessary (#4497)
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-watch / video-watch.component.html
index a84bafa2a7449366e8650f4d8fca80ab62d85919..83021522581c8d764b85a65da2170dd6f743f2ad 100644 (file)
     <my-plugin-placeholder pluginId="player-next"></my-plugin-placeholder>
   </div>
 
-  <div class="row">
-    <div i18n class="col-md-12 alert alert-warning" *ngIf="isVideoToImport()">
-      The video is being imported, it will be available when the import is finished.
-    </div>
-
-    <div i18n class="col-md-12 alert alert-warning" *ngIf="isVideoToTranscode()">
-      The video is being transcoded, it may not work properly.
-    </div>
-
-    <div i18n class="col-md-12 alert alert-info" *ngIf="hasVideoScheduledPublication()">
-      This video will be published on {{ video.scheduledUpdate.updateAt | date: 'full' }}.
-    </div>
-
-    <div i18n class="col-md-12 alert alert-info" *ngIf="isWaitingForLive()">
-      This live has not started yet.
-    </div>
-
-    <div i18n class="col-md-12 alert alert-info" *ngIf="isLiveEnded()">
-      This live has ended.
-    </div>
-
-    <div class="col-md-12 alert alert-danger" *ngIf="video?.blacklisted">
-      <div class="blocked-label" i18n>This video is blocked.</div>
-      {{ video.blockedReason }}
-    </div>
-  </div>
+  <my-video-alert [video]="video"></my-video-alert>
 
   <!-- Video information -->
   <div *ngIf="video" class="margin-content video-bottom">
     <div class="video-info">
       <div class="video-info-first-row">
         <div>
+          <ng-template #publishedTemplate>
+            <ng-container i18n>Published <my-date-toggle [date]="video.publishedAt"></my-date-toggle></ng-container>
+            •
+            <my-video-views-counter [video]="video"></my-video-views-counter>
+          </ng-template>
+
           <div class="d-block d-md-none"> <!-- only shown on medium devices, has its counterpart for larger viewports below -->
             <h1 class="video-info-name">{{ video.name }}</h1>
 
             <div class="video-info-date-views">
-              <ng-container i18n>Published <my-date-toggle [date]="video.publishedAt"></my-date-toggle></ng-container>
-              •
-              <my-video-views-counter [video]="video"></my-video-views-counter>
+              <ng-template *ngTemplateOutlet="publishedTemplate"></ng-template>
             </div>
           </div>
 
@@ -69,9 +48,7 @@
 
             <div class="video-info-first-row-bottom">
               <div class="d-none d-md-block video-info-date-views">
-                <ng-container i18n>Published <my-date-toggle [date]="video.publishedAt"></my-date-toggle></ng-container>
-                •
-                <my-video-views-counter [video]="video"></my-video-views-counter>
+                <ng-template *ngTemplateOutlet="publishedTemplate"></ng-template>
               </div>
 
               <my-action-buttons
@@ -83,7 +60,7 @@
 
           <div class="pt-3 border-top video-info-channel d-flex">
             <div class="video-info-channel-left d-flex">
-              <my-video-avatar-channel [video]="video" [genericChannel]="isChannelDisplayNameGeneric()"></my-video-avatar-channel>
+              <my-video-avatar-channel [video]="video" [showChannel]="!isChannelDisplayNameGeneric()"></my-video-avatar-channel>
 
               <div class="video-info-channel-left-links ml-1">
                 <ng-container *ngIf="!isChannelDisplayNameGeneric()">
 
       </div>
 
-      <my-video-description [video]="video"></my-video-description>
-
-      <div class="video-attributes mb-3">
-        <div class="video-attribute">
-          <span i18n class="video-attribute-label">Privacy</span>
-          <span class="video-attribute-value">{{ video.privacy.label }}</span>
-        </div>
+      <my-video-description [video]="video" (timestampClicked)="handleTimestampClicked($event)"></my-video-description>
 
-        <div *ngIf="video.isLocal === false" class="video-attribute">
-          <span i18n class="video-attribute-label">Origin</span>
-          <a class="video-attribute-value" target="_blank" rel="noopener noreferrer" [href]="getVideoUrl()">{{ video.originInstanceHost }}</a>
-        </div>
-
-        <div *ngIf="!!video.originallyPublishedAt" class="video-attribute">
-          <span i18n class="video-attribute-label">Originally published</span>
-          <span class="video-attribute-value">{{ video.originallyPublishedAt | date: 'dd MMMM yyyy' }}</span>
-        </div>
-
-        <div class="video-attribute">
-          <span i18n class="video-attribute-label">Category</span>
-          <span *ngIf="!video.category.id" class="video-attribute-value">{{ video.category.label }}</span>
-          <a
-            *ngIf="video.category.id" class="video-attribute-value"
-            [routerLink]="[ '/search' ]" [queryParams]="{ categoryOneOf: [ video.category.id ] }"
-          >{{ video.category.label }}</a>
-        </div>
-
-        <div class="video-attribute">
-          <span i18n class="video-attribute-label">Licence</span>
-          <span *ngIf="!video.licence.id" class="video-attribute-value">{{ video.licence.label }}</span>
-          <a
-            *ngIf="video.licence.id" class="video-attribute-value"
-            [routerLink]="[ '/search' ]" [queryParams]="{ licenceOneOf: [ video.licence.id ] }"
-          >{{ video.licence.label }}</a>
-        </div>
-
-        <div class="video-attribute">
-          <span i18n class="video-attribute-label">Language</span>
-          <span *ngIf="!video.language.id" class="video-attribute-value">{{ video.language.label }}</span>
-          <a
-            *ngIf="video.language.id" class="video-attribute-value"
-            [routerLink]="[ '/search' ]" [queryParams]="{ languageOneOf: [ video.language.id ] }"
-          >{{ video.language.label }}</a>
-        </div>
-
-        <div class="video-attribute video-attribute-tags">
-          <span i18n class="video-attribute-label">Tags</span>
-          <a
-            *ngFor="let tag of getVideoTags()"
-            class="video-attribute-value" [routerLink]="[ '/search' ]" [queryParams]="{ tagsOneOf: [ tag ] }"
-          >{{ tag }}</a>
-        </div>
-
-        <div class="video-attribute" *ngIf="!video.isLive">
-          <span i18n class="video-attribute-label">Duration</span>
-          <span class="video-attribute-value">{{ video.duration | myDurationFormatter }}</span>
-        </div>
-      </div>
+      <my-video-attributes [video]="video"></my-video-attributes>
 
       <my-video-comments
         class="border-top"
     ></my-recommended-videos>
   </div>
 
-  <my-privacy-concerns></my-privacy-concerns>
+  <my-privacy-concerns *ngIf="video" [video]="video"></my-privacy-concerns>
 </div>
 
 <my-player-styles></my-player-styles>