Chocobozzz/PeerTube

View on GitHub
client/src/app/shared/shared-video-playlist/video-playlist-miniature.component.html

Summary

Maintainability
Test Coverage
<div class="miniature" [ngClass]="{ 'no-videos': playlist.videosLength === 0, 'to-manage': toManage, 'display-as-row': displayAsRow }">
  <my-link
    [internalLink]="routerLink" [href]="playlistHref" [target]="playlistTarget" [inheritParentCSS]="true"
    [title]="playlist.description" class="miniature-thumbnail" tabindex="-1"
  >
    <img alt="" [attr.aria-labelledby]="playlist.displayName" [attr.src]="playlist.thumbnailUrl" />

    <div class="miniature-playlist-info-overlay">
      <ng-container i18n>{playlist.videosLength, plural, =0 {No videos} =1 {1 video} other {{{ playlist.videosLength }} videos}}</ng-container>
    </div>

    <div class="play-overlay">
      <div class="icon"></div>
    </div>
  </my-link>

  <div class="miniature-info">
    <my-link
      [internalLink]="routerLink" [href]="playlistHref" [target]="playlistTarget" [inheritParentCSS]="true"
      [title]="playlist.description" class="miniature-name" className="ellipsis-multiline-2"
    >
      {{ playlist.displayName }}
    </my-link>

    <a i18n [routerLink]="[ '/c', playlist.videoChannelBy ]" class="by" *ngIf="displayChannel && playlist.videoChannelBy">
      {{ playlist.videoChannelBy }}
    </a>

    <div class="privacy-date">
      <span class="privacy" *ngIf="displayPrivacy">{{ playlist.privacy.label }}</span>

      <span i18n class="updated-at">Updated {{ playlist.updatedAt | myFromNow }}</span>
    </div>

    <div *ngIf="displayDescription" class="description" [innerHTML]="playlistDescription"></div>
  </div>
</div>