Chocobozzz/PeerTube

View on GitHub
client/src/app/+videos/+video-watch/shared/metadata/video-description.component.html

Summary

Maintainability
Test Coverage
<div class="video-info-description">
  <div
    #descriptionHTML
    class="video-info-description-html"
    [ngClass]="{ 'ellipsis-multiline-3': !completeDescriptionShown }"
    [innerHTML]="videoHTMLDescription"
    (timestampClicked)="onTimestampClicked($event)"
    myTimestampRouteTransformer
  ></div>

  <button
    *ngIf="(hasEllipsis() && !completeDescriptionShown) || completeDescriptionShown"
    (click)="completeDescriptionShown = !completeDescriptionShown"
    class="video-info-description-more button-unstyle"
  >
    <ng-container *ngIf="!completeDescriptionShown">
      <ng-container i18n>Show more</ng-container>
      <span class="chevron-down"></span>
    </ng-container>

    <ng-container *ngIf="completeDescriptionShown">
      <ng-container i18n>Show less</ng-container>
      <span class="chevron-up"></span>
    </ng-container>
  </button>
</div>