Add link to the profile who commented in notif

pull/1567/head
Chocobozzz 2019-01-21 14:08:25 +01:00
parent fdebd9a3bd
commit 0f80cb03c6
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 3 additions and 2 deletions

View File

@ -95,6 +95,7 @@ export class UserNotification implements UserNotificationServer {
case UserNotificationType.NEW_COMMENT_ON_MY_VIDEO: case UserNotificationType.NEW_COMMENT_ON_MY_VIDEO:
case UserNotificationType.COMMENT_MENTION: case UserNotificationType.COMMENT_MENTION:
this.accountUrl = this.buildAccountUrl(this.comment.account)
this.commentUrl = [ this.buildVideoUrl(this.comment.video), { threadId: this.comment.threadId } ] this.commentUrl = [ this.buildVideoUrl(this.comment.video), { threadId: this.comment.threadId } ]
break break

View File

@ -40,7 +40,7 @@
<img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.comment.account.avatarUrl" /> <img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.comment.account.avatarUrl" />
<div class="message"> <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> </div>
</ng-container> </ng-container>
@ -91,7 +91,7 @@
<img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.comment.account.avatarUrl" /> <img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.comment.account.avatarUrl" />
<div class="message"> <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> </div>
</ng-container> </ng-container>
</ng-container> </ng-container>