PeerTube/client/src/app/shared/shared-thumbnail/video-thumbnail.component.html

43 lines
2.1 KiB
HTML
Raw Normal View History

2023-03-15 14:20:26 +01:00
<a *ngIf="!videoHref" [routerLink]="getVideoRouterLink()" [queryParams]="queryParams" class="video-thumbnail" tabindex="-1">
<ng-container *ngTemplateOutlet="aContent"></ng-container>
</a>
2023-03-15 14:20:26 +01:00
<a *ngIf="videoHref" [href]="videoHref" [target]="videoTarget" class="video-thumbnail" tabindex="-1">
<ng-container *ngTemplateOutlet="aContent"></ng-container>
</a>
<ng-template #aContent>
2020-01-10 19:50:48 +01:00
<img alt="" [attr.aria-label]="video.name" [attr.src]="getImageUrl()" [ngClass]="{ 'blur-filter': nsfw }" />
2017-12-01 18:56:26 +01:00
2020-01-03 15:01:17 +01:00
<div *ngIf="displayWatchLaterPlaylist" class="video-thumbnail-actions-overlay">
<ng-container *ngIf="inWatchLaterPlaylist !== true">
2023-05-24 15:27:15 +02:00
<button class="video-thumbnail-watch-later-overlay button-unstyle" placement="left" [ngbTooltip]="addToWatchLaterText" container="body" (click)="onWatchLaterClick($event)">
<my-global-icon iconName="clock" [attr.aria-label]="addToWatchLaterText" role="button"></my-global-icon>
2023-05-24 15:27:15 +02:00
</button>
</ng-container>
2020-01-03 15:01:17 +01:00
<ng-container *ngIf="inWatchLaterPlaylist === true">
2023-05-24 15:27:15 +02:00
<button class="video-thumbnail-watch-later-overlay button-unstyle" placement="left" [ngbTooltip]="addedToWatchLaterText" container="body" (click)="onWatchLaterClick($event)">
<my-global-icon iconName="tick" [attr.aria-label]="addedToWatchLaterText" role="button"></my-global-icon>
2023-05-24 15:27:15 +02:00
</button>
</ng-container>
</div>
<div class="video-thumbnail-label-overlay warning"><ng-content select="label-warning"></ng-content></div>
<div class="video-thumbnail-label-overlay danger"><ng-content select="label-danger"></ng-content></div>
2020-10-27 08:45:30 +01:00
<div class="video-thumbnail-duration-overlay" *ngIf="!video.isLive">{{ video.durationLabel }}</div>
2020-11-13 14:36:30 +01:00
<div class="video-thumbnail-live-overlay" [ngClass]="{ 'live-ended': isLiveEnded() }" *ngIf="video.isLive">
<ng-container i18n *ngIf="!isLiveEnded()">LIVE</ng-container>
<ng-container i18n *ngIf="isLiveEnded()">LIVE ENDED</ng-container>
</div>
2018-10-05 11:15:06 +02:00
2019-03-06 15:36:44 +01:00
<div class="play-overlay">
<div class="icon"></div>
</div>
2019-02-20 14:56:18 +01:00
2018-10-05 11:15:06 +02:00
<div class="progress-bar" *ngIf="video.userHistory?.currentTime">
<div [ngStyle]="{ 'width.%': getProgressPercent() }"></div>
</div>
</ng-template>