]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
changed video rating popover text with link to login page (#3168)
authortest2a <39449563+test2a@users.noreply.github.com>
Fri, 30 Oct 2020 10:30:21 +0000 (10:30 +0000)
committerGitHub <noreply@github.com>
Fri, 30 Oct 2020 10:30:21 +0000 (11:30 +0100)
Co-authored-by: Rigel Kent <sendmemail@rigelk.eu>
client/src/app/+videos/+video-watch/video-watch.component.html
client/src/app/+videos/+video-watch/video-watch.component.scss
client/src/app/+videos/+video-watch/video-watch.component.ts

index 076c6205f35a1a9d9fa476c13bdfd9be5dccd7fe..0d1768aa989387ae8276fe436baca9f3a83514f2 100644 (file)
               </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"
@@ -71,7 +75,7 @@
                 </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"
index 9c7f9a462c5cd1d7df6913e27a4d15b98a6ecd8e..b2bd04cf30fc64fe7556b8e256e4eb8de820bb3d 100644 (file)
@@ -577,10 +577,6 @@ my-video-comments {
 
   .privacy-concerns {
     width: 100%;
-
-    strong {
-      display: none;
-    }
   }
 }
 
index 8e6d62a09c204638c2b095184c24fb7e41cc21eb..fde32dc7401bc78c121858b8a2a911a18e80057f 100644 (file)
@@ -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 () {