]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/shared/video/video-thumbnail.component.html
Display all miniature actions on hover and focus
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / video / video-thumbnail.component.html
1 <a
2 [routerLink]="getVideoRouterLink()" [queryParams]="queryParams" [attr.title]="video.name"
3 class="video-thumbnail"
4 (mouseenter)="load()" (focus)="load()"
5 >
6 <img alt="" [attr.aria-labelledby]="video.name" [attr.src]="getImageUrl()" [ngClass]="{ 'blur-filter': nsfw }" />
7
8 <div *ngIf="isUserLoggedIn()" class="video-thumbnail-actions-overlay">
9 <ng-container *ngIf="addedToWatchLater !== true">
10 <div class="video-thumbnail-watch-later-overlay" placement="left" [ngbTooltip]="addToWatchLaterText" container="body" (click)="addToWatchLater();$event.stopPropagation();false">
11 <my-global-icon iconName="clock" [attr.aria-label]="addToWatchLaterText" role="button"></my-global-icon>
12 </div>
13 </ng-container>
14 <ng-container *ngIf="addedToWatchLater === true">
15 <div class="video-thumbnail-watch-later-overlay" placement="left" [ngbTooltip]="addedToWatchLaterText" container="body" (click)="removeFromWatchLater();$event.stopPropagation();false">
16 <my-global-icon iconName="tick" [attr.aria-label]="addedToWatchLaterText" role="button"></my-global-icon>
17 </div>
18 </ng-container>
19 </div>
20
21 <div class="video-thumbnail-duration-overlay">{{ video.durationLabel }}</div>
22
23 <div class="play-overlay">
24 <div class="icon"></div>
25 </div>
26
27 <div class="progress-bar" *ngIf="video.userHistory?.currentTime">
28 <div [ngStyle]="{ 'width.%': getProgressPercent() }"></div>
29 </div>
30 </a>