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"></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"></my-global-icon>
32 <div class=
"message" i18n
>
33 Your video
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.videoUrl">{{ notification.video.name }}
</a> has been unblacklisted
37 <ng-container *
ngSwitchCase=
"UserNotificationType.BLACKLIST_ON_MY_VIDEO">
38 <my-global-icon iconName=
"no"></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 blacklisted
45 <ng-container *
ngSwitchCase=
"UserNotificationType.NEW_VIDEO_ABUSE_FOR_MODERATORS">
46 <my-global-icon iconName=
"alert"></my-global-icon>
48 <div class=
"message" i18n
>
49 <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>
53 <ng-container *
ngSwitchCase=
"UserNotificationType.VIDEO_AUTO_BLACKLIST_FOR_MODERATORS">
54 <my-global-icon iconName=
"no"></my-global-icon>
56 <div class=
"message" i18n
>
57 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">auto-blacklisted
</a>
61 <ng-container *
ngSwitchCase=
"UserNotificationType.NEW_COMMENT_ON_MY_VIDEO">
62 <ng-container *
ngIf=
"notification.comment; then hasComment; else noComment"></ng-container>
64 <ng-template #hasComment
>
65 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.accountUrl">
66 <img alt=
"" aria-labelledby=
"avatar" class=
"avatar" [src]=
"notification.comment.account.avatarUrl" />
69 <div class=
"message" i18n
>
70 <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>
74 <ng-template #noComment
>
75 <my-global-icon iconName=
"alert"></my-global-icon>
77 <div class=
"message" i18n
>
78 The notification concerns a comment now unavailable
83 <ng-container *
ngSwitchCase=
"UserNotificationType.MY_VIDEO_PUBLISHED">
84 <my-global-icon iconName=
"sparkle"></my-global-icon>
86 <div class=
"message" i18n
>
87 Your video
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.videoUrl">{{ notification.video.name }}
</a> has been published
91 <ng-container *
ngSwitchCase=
"UserNotificationType.MY_VIDEO_IMPORT_SUCCESS">
92 <my-global-icon iconName=
"cloud-download"></my-global-icon>
94 <div class=
"message" i18n
>
95 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.videoUrl || notification.videoImportUrl">Your video import
</a> {{ notification.videoImportIdentifier }} succeeded
99 <ng-container *
ngSwitchCase=
"UserNotificationType.MY_VIDEO_IMPORT_ERROR">
100 <my-global-icon iconName=
"cloud-error"></my-global-icon>
102 <div class=
"message" i18n
>
103 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.videoImportUrl">Your video import
</a> {{ notification.videoImportIdentifier }} failed
107 <ng-container *
ngSwitchCase=
"UserNotificationType.NEW_USER_REGISTRATION">
108 <my-global-icon iconName=
"user-add"></my-global-icon>
110 <div class=
"message" i18n
>
111 User
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.accountUrl">{{ notification.account.name }}
</a> registered on your instance
115 <ng-container *
ngSwitchCase=
"UserNotificationType.NEW_FOLLOW">
116 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.accountUrl">
117 <img alt=
"" aria-labelledby=
"avatar" class=
"avatar" [src]=
"notification.actorFollow.follower.avatarUrl" />
120 <div class=
"message" i18n
>
121 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.accountUrl">{{ notification.actorFollow.follower.displayName }}
</a> is following
123 <ng-container *
ngIf=
"notification.actorFollow.following.type === 'channel'">your channel {{ notification.actorFollow.following.displayName }}
</ng-container>
124 <ng-container *
ngIf=
"notification.actorFollow.following.type === 'account'">your account
</ng-container>
128 <ng-container *
ngSwitchCase=
"UserNotificationType.COMMENT_MENTION">
129 <a (click)=
"markAsRead(notification)" [routerLink]=
"notification.accountUrl">
130 <img alt=
"" aria-labelledby=
"avatar" class=
"avatar" [src]=
"notification.comment.account.avatarUrl" />
133 <div class=
"message" i18n
>
134 <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>
138 <ng-container *
ngSwitchCase=
"UserNotificationType.NEW_INSTANCE_FOLLOWER">
139 <my-global-icon iconName=
"users"></my-global-icon>
141 <div class=
"message" i18n
>
142 Your instance has
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.instanceFollowUrl">a new follower
</a> ({{ notification.actorFollow?.follower.host }})
143 <ng-container *
ngIf=
"notification.actorFollow?.state === 'pending'"> awaiting your approval
</ng-container>
147 <ng-container *
ngSwitchCase=
"UserNotificationType.AUTO_INSTANCE_FOLLOWING">
148 <my-global-icon iconName=
"users"></my-global-icon>
150 <div class=
"message" i18n
>
151 Your instance automatically followed
<a (click)=
"markAsRead(notification)" [routerLink]=
"notification.instanceFollowUrl">{{ notification.actorFollow.following.host }}
</a>
155 <ng-container *ngSwitchDefault
>
156 <my-global-icon iconName=
"alert"></my-global-icon>
158 <div class=
"message" i18n
>
159 The notification points to a content now unavailable
164 <div [title]=
"notification.createdAt" class=
"from-date">{{ notification.createdAt | myFromNow }}
</div>