1 <div *
ngIf=
"componentPagination.totalItems === 0" class=
"no-notification" i18n
>You don't have notifications.
</div>
3 <div class=
"notifications" myInfiniteScroller [autoInit]=
"true" (nearOfBottom)=
"onNearOfBottom()" [dataObservable]=
"onDataSubject.asObservable()">
4 <div *
ngFor=
"let notification of notifications" class=
"notification" [ngClass]=
"{ unread: !notification.read }" (click)=
"markAsRead(notification)">
6 <ng-container [ngSwitch]=
"notification.type">
7 <ng-container *
ngSwitchCase=
"UserNotificationType.NEW_VIDEO_FROM_SUBSCRIPTION">
8 <ng-container *
ngIf=
"notification.video; then hasVideo; else noVideo"></ng-container>
10 <ng-template #hasVideo
>
11 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.accountUrl">
12 <img alt=
"" aria-labelledby=
"avatar" class=
"avatar" [src]=
"notification.video.channel.avatarUrl" />
15 <div class=
"message" i18n
>
16 {{ notification.video.channel.displayName }} published a new video:
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.videoUrl">{{ notification.video.name }}
</a>
20 <ng-template #noVideo
>
21 <my-global-icon iconName=
"alert" aria-hidden=
"true"></my-global-icon>
23 <div class=
"message" i18n
>
24 The notification concerns a video now unavailable
29 <ng-container *
ngSwitchCase=
"UserNotificationType.UNBLACKLIST_ON_MY_VIDEO">
30 <my-global-icon iconName=
"undo" aria-hidden=
"true"></my-global-icon>
32 <div class=
"message" i18n
>
33 Your video
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.videoUrl">{{ notification.video.name }}
</a> has been unblocked
37 <ng-container *
ngSwitchCase=
"UserNotificationType.BLACKLIST_ON_MY_VIDEO">
38 <my-global-icon iconName=
"no" aria-hidden=
"true"></my-global-icon>
40 <div class=
"message" i18n
>
41 Your video
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.videoUrl">{{ notification.videoBlacklist.video.name }}
</a> has been blocked
45 <ng-container *
ngSwitchCase=
"UserNotificationType.NEW_ABUSE_FOR_MODERATORS">
46 <my-global-icon iconName=
"flag" aria-hidden=
"true"></my-global-icon>
48 <div class=
"message" *
ngIf=
"notification.videoUrl" i18n
>
49 <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>
52 <div class=
"message" *
ngIf=
"notification.commentUrl" i18n
>
53 <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>
56 <div class=
"message" *
ngIf=
"notification.accountUrl" i18n
>
57 <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>
60 <!-- Deleted entity associated to the abuse -->
61 <div class=
"message" *
ngIf=
"!notification.videoUrl && !notification.commentUrl && !notification.accountUrl" i18n
>
62 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.abuseUrl" [queryParams]=
"notification.abuseQueryParams">A new abuse
</a> has been created
66 <ng-container *
ngSwitchCase=
"UserNotificationType.ABUSE_STATE_CHANGE">
67 <my-global-icon iconName=
"flag" aria-hidden=
"true"></my-global-icon>
69 <div class=
"message" i18n
>
70 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.abuseUrl" [queryParams]=
"notification.abuseQueryParams">Your abuse {{ notification.abuse.id }}
</a> has been
71 <ng-container *
ngIf=
"isAccepted(notification)">accepted
</ng-container>
72 <ng-container *
ngIf=
"!isAccepted(notification)">rejected
</ng-container>
76 <ng-container *
ngSwitchCase=
"UserNotificationType.ABUSE_NEW_MESSAGE">
77 <my-global-icon iconName=
"flag" aria-hidden=
"true"></my-global-icon>
79 <div class=
"message" i18n
>
80 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.abuseUrl" [queryParams]=
"notification.abuseQueryParams">Abuse {{ notification.abuse.id }}
</a> has a new message
84 <ng-container *
ngSwitchCase=
"UserNotificationType.VIDEO_AUTO_BLACKLIST_FOR_MODERATORS">
85 <my-global-icon iconName=
"no" aria-hidden=
"true"></my-global-icon>
87 <div class=
"message" i18n
>
88 The recently added video
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.videoUrl">{{ notification.videoBlacklist.video.name }}
</a> has been
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.videoAutoBlacklistUrl">automatically blocked
</a>
92 <ng-container *
ngSwitchCase=
"UserNotificationType.NEW_COMMENT_ON_MY_VIDEO">
93 <ng-container *
ngIf=
"notification.comment; then hasComment; else noComment"></ng-container>
95 <ng-template #hasComment
>
96 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.accountUrl">
97 <img alt=
"" aria-labelledby=
"avatar" class=
"avatar" [src]=
"notification.comment.account.avatarUrl" />
100 <div class=
"message" i18n
>
101 <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>
105 <ng-template #noComment
>
106 <my-global-icon iconName=
"alert" aria-hidden=
"true"></my-global-icon>
108 <div class=
"message" i18n
>
109 The notification concerns a comment now unavailable
114 <ng-container *
ngSwitchCase=
"UserNotificationType.MY_VIDEO_PUBLISHED">
115 <my-global-icon iconName=
"film" aria-hidden=
"true"></my-global-icon>
117 <div class=
"message" i18n
>
118 Your video
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.videoUrl">{{ notification.video.name }}
</a> has been published
122 <ng-container *
ngSwitchCase=
"UserNotificationType.MY_VIDEO_IMPORT_SUCCESS">
123 <my-global-icon iconName=
"cloud-download" aria-hidden=
"true"></my-global-icon>
125 <div class=
"message" i18n
>
126 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.videoUrl || notification.videoImportUrl">Your video import
</a> {{ notification.videoImportIdentifier }} succeeded
130 <ng-container *
ngSwitchCase=
"UserNotificationType.MY_VIDEO_IMPORT_ERROR">
131 <my-global-icon iconName=
"cloud-error" aria-hidden=
"true"></my-global-icon>
133 <div class=
"message" i18n
>
134 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.videoImportUrl">Your video import
</a> {{ notification.videoImportIdentifier }} failed
138 <ng-container *
ngSwitchCase=
"UserNotificationType.NEW_USER_REGISTRATION">
139 <my-global-icon iconName=
"user-add" aria-hidden=
"true"></my-global-icon>
141 <div class=
"message" i18n
>
142 User
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.accountUrl">{{ notification.account.name }}
</a> registered on your instance
146 <ng-container *
ngSwitchCase=
"UserNotificationType.NEW_FOLLOW">
147 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.accountUrl">
148 <img alt=
"" aria-labelledby=
"avatar" class=
"avatar" [src]=
"notification.actorFollow.follower.avatarUrl" />
151 <div class=
"message" i18n
>
152 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.accountUrl">{{ notification.actorFollow.follower.displayName }}
</a> is following
154 <ng-container *
ngIf=
"notification.actorFollow.following.type === 'channel'">your channel {{ notification.actorFollow.following.displayName }}
</ng-container>
155 <ng-container *
ngIf=
"notification.actorFollow.following.type === 'account'">your account
</ng-container>
159 <ng-container *
ngSwitchCase=
"UserNotificationType.COMMENT_MENTION">
160 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.accountUrl">
161 <img alt=
"" aria-labelledby=
"avatar" class=
"avatar" [src]=
"notification.comment.account.avatarUrl" />
164 <div class=
"message" i18n
>
165 <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>
169 <ng-container *
ngSwitchCase=
"UserNotificationType.NEW_INSTANCE_FOLLOWER">
170 <my-global-icon iconName=
"users" aria-hidden=
"true"></my-global-icon>
172 <div class=
"message" i18n
>
173 Your instance has
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.instanceFollowUrl">a new follower
</a> ({{ notification.actorFollow?.follower.host }})
174 <ng-container *
ngIf=
"notification.actorFollow?.state === 'pending'"> awaiting your approval
</ng-container>
178 <ng-container *
ngSwitchCase=
"UserNotificationType.AUTO_INSTANCE_FOLLOWING">
179 <my-global-icon iconName=
"users" aria-hidden=
"true"></my-global-icon>
181 <div class=
"message" i18n
>
182 Your instance automatically followed
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.instanceFollowUrl">{{ notification.actorFollow.following.host }}
</a>
186 <ng-container *ngSwitchDefault
>
187 <my-global-icon iconName=
"alert" aria-hidden=
"true"></my-global-icon>
189 <div class=
"message" i18n
>
190 The notification points to a content now unavailable
195 <div [title]=
"notification.createdAt" class=
"from-date">{{ notification.createdAt | myFromNow }}
</div>