<ng-template #noVideo>
<my-global-icon iconName="alert" aria-hidden="true"></my-global-icon>
-
+
<div class="message" i18n>
The notification concerns a video now unavailable
</div>
</div>
</ng-container>
- <ng-container *ngSwitchCase="UserNotificationType.NEW_VIDEO_ABUSE_FOR_MODERATORS">
+ <ng-container *ngSwitchCase="UserNotificationType.NEW_ABUSE_FOR_MODERATORS">
+ <my-global-icon iconName="flag" aria-hidden="true"></my-global-icon>
+
+ <div class="message" *ngIf="notification.videoUrl" i18n>
+ <a (click)="markAsRead(notification)" [routerLink]="notification.abuseUrl" [queryParams]="notification.abuseQueryParams">A new video abuse</a> has been created on video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.abuse.video.name }}</a>
+ </div>
+
+ <div class="message" *ngIf="notification.commentUrl" i18n>
+ <a (click)="markAsRead(notification)" [routerLink]="notification.abuseUrl" [queryParams]="notification.abuseQueryParams">A new comment abuse</a> has been created on video <a (click)="markAsRead(notification)" [routerLink]="notification.commentUrl">{{ notification.abuse.comment.video.name }}</a>
+ </div>
+
+ <div class="message" *ngIf="notification.accountUrl" i18n>
+ <a (click)="markAsRead(notification)" [routerLink]="notification.abuseUrl" [queryParams]="notification.abuseQueryParams">A new account abuse</a> has been created on account <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.abuse.account.displayName }}</a>
+ </div>
+
+ <!-- Deleted entity associated to the abuse -->
+ <div class="message" *ngIf="!notification.videoUrl && !notification.commentUrl && !notification.accountUrl" i18n>
+ <a (click)="markAsRead(notification)" [routerLink]="notification.abuseUrl" [queryParams]="notification.abuseQueryParams">A new abuse</a> has been created
+ </div>
+ </ng-container>
+
+ <ng-container *ngSwitchCase="UserNotificationType.ABUSE_STATE_CHANGE">
<my-global-icon iconName="flag" aria-hidden="true"></my-global-icon>
<div class="message" i18n>
- <a (click)="markAsRead(notification)" [routerLink]="notification.videoAbuseUrl">A new video abuse</a> has been created on video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.videoAbuse.video.name }}</a>
+ <a (click)="markAsRead(notification)" [routerLink]="notification.abuseUrl" [queryParams]="notification.abuseQueryParams">Your abuse {{ notification.abuse.id }}</a> has been
+ <ng-container *ngIf="isAccepted(notification)">accepted</ng-container>
+ <ng-container *ngIf="!isAccepted(notification)">rejected</ng-container>
+ </div>
+ </ng-container>
+
+ <ng-container *ngSwitchCase="UserNotificationType.ABUSE_NEW_MESSAGE">
+ <my-global-icon iconName="flag" aria-hidden="true"></my-global-icon>
+
+ <div class="message" i18n>
+ <a (click)="markAsRead(notification)" [routerLink]="notification.abuseUrl" [queryParams]="notification.abuseQueryParams">Abuse {{ notification.abuse.id }}</a> has a new message
</div>
</ng-container>
</ng-container>
<ng-container *ngSwitchCase="UserNotificationType.NEW_COMMENT_ON_MY_VIDEO">
- <ng-container *ngIf="notification.comment; then hasComment; else noComment"></ng-container>
-
- <ng-template #hasComment>
+ <ng-container *ngIf="notification.comment">
<a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">
<img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.comment.account.avatarUrl" />
</a>
-
+
<div class="message" i18n>
<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-template>
+ </ng-container>
- <ng-template #noComment>
+ <ng-container *ngIf="!notification.comment">
<my-global-icon iconName="alert" aria-hidden="true"></my-global-icon>
-
+
<div class="message" i18n>
The notification concerns a comment now unavailable
</div>
- </ng-template>
+ </ng-container>
</ng-container>
<ng-container *ngSwitchCase="UserNotificationType.MY_VIDEO_PUBLISHED">
</ng-container>
<ng-container *ngSwitchCase="UserNotificationType.COMMENT_MENTION">
- <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">
- <img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.comment.account.avatarUrl" />
- </a>
+ <ng-container *ngIf="notification.comment">
+ <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">
+ <img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.comment.account.avatarUrl" />
+ </a>
- <div class="message" i18n>
- <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 class="message" i18n>
+ <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 *ngIf="!notification.comment">
+ <my-global-icon iconName="alert" aria-hidden="true"></my-global-icon>
+
+ <div class="message" i18n>
+ The notification concerns a comment now unavailable
+ </div>
+ </ng-container>
</ng-container>
<ng-container *ngSwitchCase="UserNotificationType.NEW_INSTANCE_FOLLOWER">
<my-global-icon iconName="alert" aria-hidden="true"></my-global-icon>
<div class="message" i18n>
- The notification points to a content now unavailable
+ The notification points to content now unavailable
</div>
</ng-container>
</ng-container>