]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Add link to the profile who commented in notif
authorChocobozzz <me@florianbigard.com>
Mon, 21 Jan 2019 13:08:25 +0000 (14:08 +0100)
committerChocobozzz <me@florianbigard.com>
Mon, 21 Jan 2019 13:08:25 +0000 (14:08 +0100)
client/src/app/shared/users/user-notification.model.ts
client/src/app/shared/users/user-notifications.component.html

index 3bb53ff45eea73173f044c7d17f75cc4f2a84af3..125d2120cffb49288e435de96201c5c025473f75 100644 (file)
@@ -95,6 +95,7 @@ export class UserNotification implements UserNotificationServer {
 
       case UserNotificationType.NEW_COMMENT_ON_MY_VIDEO:
       case UserNotificationType.COMMENT_MENTION:
+        this.accountUrl = this.buildAccountUrl(this.comment.account)
         this.commentUrl = [ this.buildVideoUrl(this.comment.video), { threadId: this.comment.threadId } ]
         break
 
index caa518e7f38a52947a73fc287634b62878526584..0d69e0febde0f089f41b17db015e2026f64efc23 100644 (file)
@@ -40,7 +40,7 @@
         <img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.comment.account.avatarUrl" />
 
         <div class="message">
-          {{ notification.comment.account.displayName }} commented your video <a (click)="markAsRead(notification)" [routerLink]="notification.commentUrl">{{ notification.comment.video.name }}</a>
+          <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.comment.account.displayName }}</a> commented your video <a (click)="markAsRead(notification)" [routerLink]="notification.commentUrl">{{ notification.comment.video.name }}</a>
         </div>
       </ng-container>
 
@@ -91,7 +91,7 @@
         <img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.comment.account.avatarUrl" />
 
         <div class="message">
-          {{ notification.comment.account.displayName }} mentioned you on <a (click)="markAsRead(notification)" [routerLink]="notification.commentUrl">video {{ notification.comment.video.name }}</a>
+          <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.comment.account.displayName }}</a> mentioned you on <a (click)="markAsRead(notification)" [routerLink]="notification.commentUrl">video {{ notification.comment.video.name }}</a>
         </div>
       </ng-container>
     </ng-container>