]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Refactor a little bit watch html
authorChocobozzz <me@florianbigard.com>
Tue, 29 Jun 2021 16:08:59 +0000 (18:08 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 29 Jun 2021 16:08:59 +0000 (18:08 +0200)
client/src/app/+videos/+video-watch/video-watch.component.html

index a84bafa2a7449366e8650f4d8fca80ab62d85919..09be2d0859d0a8bd302d54ac60c3efccdb3e7656 100644 (file)
     <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 +73,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