diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-29 17:57:59 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-29 18:01:02 +0200 |
commit | 06a555797929d4867264b096c8420cdedd50f496 (patch) | |
tree | e68b0038d3f3f8ccae43b3bd22509200888a699a /client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.html | |
parent | 6ebdd12f8806edd7076e89c8ea3bcfaf5658b2b6 (diff) | |
download | PeerTube-06a555797929d4867264b096c8420cdedd50f496.tar.gz PeerTube-06a555797929d4867264b096c8420cdedd50f496.tar.zst PeerTube-06a555797929d4867264b096c8420cdedd50f496.zip |
Move watch action buttons in a dedicated component
Diffstat (limited to 'client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.html')
-rw-r--r-- | client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.html | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.html b/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.html new file mode 100644 index 000000000..7dd9b3678 --- /dev/null +++ b/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.html | |||
@@ -0,0 +1,23 @@ | |||
1 | <ng-template #ratePopoverText> | ||
2 | <span [innerHTML]="getRatePopoverText()"></span> | ||
3 | </ng-template> | ||
4 | |||
5 | <button | ||
6 | [ngbPopover]="getRatePopoverText() && ratePopoverText" [ngClass]="{ 'activated': userRating === 'like' }" (click)="setLike()" (keyup.enter)="setLike()" | ||
7 | class="action-button action-button-like" [attr.aria-pressed]="userRating === 'like'" [attr.aria-label]="tooltipLike" | ||
8 | [ngbTooltip]="tooltipLike" | ||
9 | placement="bottom auto" | ||
10 | > | ||
11 | <my-global-icon iconName="like"></my-global-icon> | ||
12 | <span *ngIf="video.likes" class="count">{{ video.likes }}</span> | ||
13 | </button> | ||
14 | |||
15 | <button | ||
16 | [ngbPopover]="getRatePopoverText() && ratePopoverText" [ngClass]="{ 'activated': userRating === 'dislike' }" (click)="setDislike()" (keyup.enter)="setDislike()" | ||
17 | class="action-button action-button-dislike" [attr.aria-pressed]="userRating === 'dislike'" [attr.aria-label]="tooltipDislike" | ||
18 | [ngbTooltip]="tooltipDislike" | ||
19 | placement="bottom auto" | ||
20 | > | ||
21 | <my-global-icon iconName="dislike"></my-global-icon> | ||
22 | <span *ngIf="video.dislikes" class="count">{{ video.dislikes }}</span> | ||
23 | </button> | ||