aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos/+video-watch/video-rate.component.html
blob: 7dd9b3678945a1bdcb8e48afb136ac93e5bfc67a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<ng-template #ratePopoverText>
  <span [innerHTML]="getRatePopoverText()"></span>
</ng-template>

<button
  [ngbPopover]="getRatePopoverText() && ratePopoverText" [ngClass]="{ 'activated': userRating === 'like' }" (click)="setLike()" (keyup.enter)="setLike()"
  class="action-button action-button-like" [attr.aria-pressed]="userRating === 'like'" [attr.aria-label]="tooltipLike"
  [ngbTooltip]="tooltipLike"
  placement="bottom auto"
>
  <my-global-icon iconName="like"></my-global-icon>
  <span *ngIf="video.likes" class="count">{{ video.likes }}</span>
</button>

<button
  [ngbPopover]="getRatePopoverText() && ratePopoverText" [ngClass]="{ 'activated': userRating === 'dislike' }" (click)="setDislike()" (keyup.enter)="setDislike()"
  class="action-button action-button-dislike" [attr.aria-pressed]="userRating === 'dislike'" [attr.aria-label]="tooltipDislike"
  [ngbTooltip]="tooltipDislike"
  placement="bottom auto"
>
  <my-global-icon iconName="dislike"></my-global-icon>
  <span *ngIf="video.dislikes" class="count">{{ video.dislikes }}</span>
</button>