aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/app/shared/video/video-miniature.component.html
blob: 819be6d483c1cf014e7b4bbe8ee893f5ba00ea8f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
                                                                                                         



                                                                                                                                                             
 





                                                                                                                           
                           

                                                     
                                                                                                

                            
                                                                                                
                                                                                                                                                               
               




                                                                                               










                                                                                                                                                                          
                                                                                                                           










                                                                                                             

          
                               
                                                                                                                                                    



                                                                                                                                   
          

        
<div class="video-miniature" [ngClass]="{ 'display-as-row': displayAsRow }" (mouseenter)="loadActions()">
  <my-video-thumbnail
    [video]="video" [nsfw]="isVideoBlur"
    [displayWatchLaterPlaylist]="isWatchLaterPlaylistDisplayed()" [inWatchLaterPlaylist]="inWatchLaterPlaylist" (watchLaterClick)="onWatchLaterClick($event)"
  ></my-video-thumbnail>

  <div class="video-bottom">
    <div class="video-miniature-information">
      <a
        tabindex="-1"
        class="video-miniature-name"
        [routerLink]="[ '/videos/watch', video.uuid ]" [attr.title]="video.name" [ngClass]="{ 'blur-filter': isVideoBlur }"
      >{{ video.name }}</a>

      <span class="video-miniature-created-at-views">
        <my-date-toggle *ngIf="displayOptions.date" [date]="video.publishedAt"></my-date-toggle>

        <span class="views">
          <ng-container *ngIf="displayOptions.date && displayOptions.views"></ng-container>
          <ng-container i18n *ngIf="displayOptions.views">{video.views, plural, =1 {1 view} other {{{ video.views | myNumberFormatter }} views}}</ng-container>
        </span>

        <ng-container *ngIf="displayOptions.privacyLabel">
          <span *ngIf="isUnlistedVideo()" class="badge badge-warning ml-1" i18n>Unlisted</span>
          <span *ngIf="isPrivateVideo()" class="badge badge-danger ml-1" i18n>Private</span>
        </ng-container>
      </span>

      <a tabindex="-1" *ngIf="displayOptions.by && displayOwnerAccount()" class="video-miniature-account" [routerLink]="[ '/accounts', video.byAccount ]">
        {{ video.byAccount }}
      </a>
      <a tabindex="-1" *ngIf="displayOptions.by && displayOwnerVideoChannel()" class="video-miniature-channel" [routerLink]="[ '/video-channels', video.byVideoChannel ]">
        {{ video.byVideoChannel }}
      </a>

      <div class="video-info-privacy">
        <ng-container *ngIf="displayOptions.privacyText">{{ video.privacy.label }}</ng-container>
        <ng-container *ngIf="displayOptions.privacyText && displayOptions.state && getStateLabel(video)"> - </ng-container>
        <ng-container *ngIf="displayOptions.state">{{ getStateLabel(video) }}</ng-container>
      </div>

      <div *ngIf="displayOptions.blacklistInfo && video.blacklisted" class="video-info-blacklisted">
        <span class="blacklisted-label" i18n>Blacklisted</span>
        <span class="blacklisted-reason" *ngIf="video.blacklistedReason">{{ video.blacklistedReason }}</span>
      </div>

      <div i18n *ngIf="displayOptions.nsfw && video.nsfw" class="video-info-nsfw">
        Sensitive
      </div>
    </div>

    <div class="video-actions">
      <!-- FIXME: remove bottom placement when overflow is fixed in bootstrap dropdown: https://github.com/ng-bootstrap/ng-bootstrap/issues/3495 -->
      <my-video-actions-dropdown
        *ngIf="showActions" [video]="video" [displayOptions]="videoActionsDisplayOptions" placement="bottom-left bottom-right left"
        (videoRemoved)="onVideoRemoved()" (videoBlacklisted)="onVideoBlacklisted()" (videoUnblacklisted)="onVideoUnblacklisted()"
      ></my-video-actions-dropdown>
    </div>
  </div>
</div>