1 <div *
ngIf=
"componentPagination.totalItems === 0" class=
"no-notification" i18n
>You don't have notifications.
</div>
3 <div class=
"notifications" myInfiniteScroller (nearOfBottom)=
"onNearOfBottom()" [dataObservable]=
"onDataSubject.asObservable()">
4 <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->
5 <div *
ngFor=
"let notification of notifications" class=
"notification" [ngClass]=
"{ unread: !notification.read }" (click)=
"markAsRead(notification)">
7 <ng-container [ngSwitch]=
"notification.type">
8 <ng-container *
ngSwitchCase=
"1"> <!-- UserNotificationType.NEW_VIDEO_FROM_SUBSCRIPTION -->
9 <ng-container *
ngIf=
"notification.video; then hasVideo; else noVideo"></ng-container>
11 <ng-template #hasVideo
>
12 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.accountUrl">
13 <img alt=
"" aria-labelledby=
"avatar" class=
"avatar" [src]=
"notification.video.channel.avatarUrl" />
16 <div class=
"message" i18n
>
17 {{ notification.video.channel.displayName }} published a new video:
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.videoUrl">{{ notification.video.name }}
</a>
21 <ng-template #noVideo
>
22 <my-global-icon iconName=
"alert" aria-hidden=
"true"></my-global-icon>
24 <div class=
"message" i18n
>
25 The notification concerns a video now unavailable
30 <ng-container *
ngSwitchCase=
"5"> <!-- UserNotificationType.UNBLACKLIST_ON_MY_VIDEO -->
31 <my-global-icon iconName=
"undo" aria-hidden=
"true"></my-global-icon>
33 <div class=
"message" i18n
>
34 Your video
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.videoUrl">{{ notification.video.name }}
</a> has been unblocked
38 <ng-container *
ngSwitchCase=
"4"> <!-- UserNotificationType.BLACKLIST_ON_MY_VIDEO -->
39 <my-global-icon iconName=
"no" aria-hidden=
"true"></my-global-icon>
41 <div class=
"message" i18n
>
42 Your video
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.videoUrl">{{ notification.videoBlacklist.video.name }}
</a> has been blocked
46 <ng-container *
ngSwitchCase=
"3"> <!-- UserNotificationType.NEW_ABUSE_FOR_MODERATORS -->
47 <my-global-icon iconName=
"flag" aria-hidden=
"true"></my-global-icon>
49 <div class=
"message" *
ngIf=
"notification.videoUrl" i18n
>
50 <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>
53 <div class=
"message" *
ngIf=
"notification.commentUrl" i18n
>
54 <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>
57 <div class=
"message" *
ngIf=
"notification.accountUrl" i18n
>
58 <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>
61 <!-- Deleted entity associated to the abuse -->
62 <div class=
"message" *
ngIf=
"!notification.videoUrl && !notification.commentUrl && !notification.accountUrl" i18n
>
63 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.abuseUrl" [queryParams]=
"notification.abuseQueryParams">A new abuse
</a> has been created
67 <ng-container *
ngSwitchCase=
"15"> <!-- UserNotificationType.ABUSE_STATE_CHANGE -->
68 <my-global-icon iconName=
"flag" aria-hidden=
"true"></my-global-icon>
70 <div class=
"message" i18n
>
71 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.abuseUrl" [queryParams]=
"notification.abuseQueryParams">Your abuse {{ notification.abuse.id }}
</a> has been
72 <ng-container *
ngIf=
"isAccepted(notification)">accepted
</ng-container>
73 <ng-container *
ngIf=
"!isAccepted(notification)">rejected
</ng-container>
77 <ng-container *
ngSwitchCase=
"16"> <!-- UserNotificationType.ABUSE_NEW_MESSAGE -->
78 <my-global-icon iconName=
"flag" aria-hidden=
"true"></my-global-icon>
80 <div class=
"message" i18n
>
81 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.abuseUrl" [queryParams]=
"notification.abuseQueryParams">Abuse {{ notification.abuse.id }}
</a> has a new message
85 <ng-container *
ngSwitchCase=
"12"> <!-- UserNotificationType.VIDEO_AUTO_BLACKLIST_FOR_MODERATORS -->
86 <my-global-icon iconName=
"no" aria-hidden=
"true"></my-global-icon>
88 <div class=
"message" i18n
>
89 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>
93 <ng-container *
ngSwitchCase=
"2">
94 <ng-container *
ngIf=
"notification.comment">
95 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.accountUrl">
96 <img alt=
"" aria-labelledby=
"avatar" class=
"avatar" [src]=
"notification.comment.account.avatarUrl" />
99 <div class=
"message" i18n
>
100 <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>
104 <ng-container *
ngIf=
"!notification.comment">
105 <my-global-icon iconName=
"alert" aria-hidden=
"true"></my-global-icon>
107 <div class=
"message" i18n
>
108 The notification concerns a comment now unavailable
113 <ng-container *
ngSwitchCase=
"6"> <!-- UserNotificationType.MY_VIDEO_PUBLISHED -->
114 <my-global-icon iconName=
"film" aria-hidden=
"true"></my-global-icon>
116 <div class=
"message" i18n
>
117 Your video
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.videoUrl">{{ notification.video.name }}
</a> has been published
121 <ng-container *
ngSwitchCase=
"7"> <!-- UserNotificationType.MY_VIDEO_IMPORT_SUCCESS -->
122 <my-global-icon iconName=
"cloud-download" aria-hidden=
"true"></my-global-icon>
124 <div class=
"message" i18n
>
125 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.videoUrl || notification.videoImportUrl">Your video import
</a> {{ notification.videoImportIdentifier }} succeeded
129 <ng-container *
ngSwitchCase=
"8"> <!-- UserNotificationType.MY_VIDEO_IMPORT_ERROR -->
130 <my-global-icon iconName=
"cloud-error" aria-hidden=
"true"></my-global-icon>
132 <div class=
"message" i18n
>
133 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.videoImportUrl">Your video import
</a> {{ notification.videoImportIdentifier }} failed
137 <ng-container *
ngSwitchCase=
"9"> <!-- UserNotificationType.NEW_USER_REGISTRATION -->
138 <my-global-icon iconName=
"user-add" aria-hidden=
"true"></my-global-icon>
140 <div class=
"message" i18n
>
141 User
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.accountUrl">{{ notification.account.name }}
</a> registered on your instance
145 <ng-container *
ngSwitchCase=
"10"> <!-- UserNotificationType.NEW_FOLLOW -->
146 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.accountUrl">
147 <img alt=
"" aria-labelledby=
"avatar" class=
"avatar" [src]=
"notification.actorFollow.follower.avatarUrl" />
150 <div class=
"message" i18n
>
151 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.accountUrl">{{ notification.actorFollow.follower.displayName }}
</a> is following
153 <ng-container *
ngIf=
"notification.actorFollow.following.type === 'channel'">your channel {{ notification.actorFollow.following.displayName }}
</ng-container>
154 <ng-container *
ngIf=
"notification.actorFollow.following.type === 'account'">your account
</ng-container>
158 <ng-container *
ngSwitchCase=
"11">
159 <ng-container *
ngIf=
"notification.comment">
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 *
ngIf=
"!notification.comment">
170 <my-global-icon iconName=
"alert" aria-hidden=
"true"></my-global-icon>
172 <div class=
"message" i18n
>
173 The notification concerns a comment now unavailable
178 <ng-container *
ngSwitchCase=
"13"> <!-- UserNotificationType.NEW_INSTANCE_FOLLOWER -->
179 <my-global-icon iconName=
"users" aria-hidden=
"true"></my-global-icon>
181 <div class=
"message" i18n
>
182 Your instance has
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.instanceFollowUrl">a new follower
</a> ({{ notification.actorFollow?.follower.host }})
183 <ng-container *
ngIf=
"notification.actorFollow?.state === 'pending'"> awaiting your approval
</ng-container>
187 <ng-container *
ngSwitchCase=
"14"> <!-- UserNotificationType.AUTO_INSTANCE_FOLLOWING -->
188 <my-global-icon iconName=
"users" aria-hidden=
"true"></my-global-icon>
190 <div class=
"message" i18n
>
191 Your instance automatically followed
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.instanceFollowUrl">{{ notification.actorFollow.following.host }}
</a>
195 <ng-container *
ngSwitchCase=
"17"> <!-- UserNotificationType.NEW_PLUGIN_VERSION -->
196 <my-global-icon iconName=
"cog" aria-hidden=
"true"></my-global-icon>
198 <div class=
"message" i18n
>
199 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.pluginUrl" [queryParams]=
"notification.pluginQueryParams">A new version of the plugin/theme {{ notification.plugin.name }}
</a> is available: {{ notification.plugin.latestVersion }}
203 <ng-container *
ngSwitchCase=
"18"> <!-- UserNotificationType.NEW_PEERTUBE_VERSION -->
204 <my-global-icon iconName=
"cog" aria-hidden=
"true"></my-global-icon>
206 <div class=
"message" i18n
>
207 <a (click)=
"markAsRead(notification)" [href]=
"notification.peertubeVersionLink" target=
"_blank" rel=
"noopener noreferrer">A new version of PeerTube
</a> is available: {{ notification.peertube.latestVersion }}
211 <ng-container *
ngSwitchCase=
"19"> <!-- UserNotificationType.MY_VIDEO_STUDIO_EDITION_FINISHED -->
212 <my-global-icon iconName=
"film" aria-hidden=
"true"></my-global-icon>
214 <div class=
"message" i18n
>
215 Your video
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.videoUrl">{{ notification.video.name }}
</a> edition has finished
219 <ng-container *
ngSwitchCase=
"20"> <!-- UserNotificationType.NEW_USER_REGISTRATION_REQUEST -->
220 <my-global-icon iconName=
"user-add" aria-hidden=
"true"></my-global-icon>
222 <div class=
"message" i18n
>
223 User
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.registrationsUrl">{{ notification.registration.username }}
</a> wants to register on your instance
227 <ng-container *ngSwitchDefault
>
228 <my-global-icon iconName=
"alert" aria-hidden=
"true"></my-global-icon>
230 <div class=
"message" i18n
>
231 The notification points to content now unavailable
236 <div [title]=
"notification.createdAt" class=
"from-date">{{ notification.createdAt | myFromNow }}
</div>