Skip to content

Commit

Permalink
changed video rating popover text with link to login page (#3168)
Browse files Browse the repository at this point in the history
Co-authored-by: Rigel Kent <sendmemail@rigelk.eu>
  • Loading branch information
test2a and rigelk authored Oct 30, 2020
1 parent dd1e2f2 commit 214ff6f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,13 @@ <h1 class="video-info-name">{{ video.name }}</h1>
</div>

<div class="video-actions-rates">
<ng-template #ratePopoverText>
<span [innerHTML]="getRatePopoverText()"></span>
</ng-template>

<div class="video-actions fullWidth justify-content-end">
<button
[ngbPopover]="getRatePopoverText()" [ngClass]="{ 'activated': userRating === 'like' }" (click)="setLike()" (keyup.enter)="setLike()"
[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"
Expand All @@ -71,7 +75,7 @@ <h1 class="video-info-name">{{ video.name }}</h1>
</button>

<button
[ngbPopover]="getRatePopoverText()" [ngClass]="{ 'activated': userRating === 'dislike' }" (click)="setDislike()" (keyup.enter)="setDislike()"
[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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,10 +577,6 @@ my-video-comments {

.privacy-concerns {
width: 100%;

strong {
display: none;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
getRatePopoverText () {
if (this.isUserLoggedIn()) return undefined

return $localize`You need to be connected to rate this content.`
return $localize`You need to be <a href="/login">logged in</a> to rate this video.`
}

showMoreDescription () {
Expand Down

0 comments on commit 214ff6f

Please sign in to comment.