]>
Commit | Line | Data |
---|---|---|
2f1548fd C |
1 | <div *ngIf="componentPagination.totalItems === 0" class="no-notification" i18n>You don't have notifications.</div> |
2 | ||
ad453580 | 3 | <div class="notifications" myInfiniteScroller [autoInit]="true" (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()"> |
457bb213 | 4 | <div *ngFor="let notification of notifications" class="notification" [ngClass]="{ unread: !notification.read }" (click)="markAsRead(notification)"> |
2f1548fd | 5 | |
457bb213 | 6 | <ng-container [ngSwitch]="notification.type"> |
ee2b7df0 | 7 | <ng-container *ngSwitchCase="UserNotificationType.NEW_VIDEO_FROM_SUBSCRIPTION"> |
c5c09c1e RK |
8 | <ng-container *ngIf="notification.video; then hasVideo; else noVideo"></ng-container> |
9 | ||
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" /> | |
13 | </a> | |
14 | ||
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> | |
17 | </div> | |
18 | </ng-template> | |
19 | ||
20 | <ng-template #noVideo> | |
adcf9212 | 21 | <my-global-icon iconName="alert" aria-hidden="true"></my-global-icon> |
d95d1559 | 22 | |
c5c09c1e RK |
23 | <div class="message" i18n> |
24 | The notification concerns a video now unavailable | |
25 | </div> | |
26 | </ng-template> | |
2f1548fd C |
27 | </ng-container> |
28 | ||
3487330d | 29 | <ng-container *ngSwitchCase="UserNotificationType.UNBLACKLIST_ON_MY_VIDEO"> |
adcf9212 | 30 | <my-global-icon iconName="undo" aria-hidden="true"></my-global-icon> |
457bb213 | 31 | |
ee2b7df0 | 32 | <div class="message" i18n> |
5baee5fc | 33 | Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.video.name }}</a> has been unblocked |
457bb213 | 34 | </div> |
2f1548fd C |
35 | </ng-container> |
36 | ||
3487330d | 37 | <ng-container *ngSwitchCase="UserNotificationType.BLACKLIST_ON_MY_VIDEO"> |
adcf9212 | 38 | <my-global-icon iconName="no" aria-hidden="true"></my-global-icon> |
457bb213 | 39 | |
ee2b7df0 | 40 | <div class="message" i18n> |
5baee5fc | 41 | Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.videoBlacklist.video.name }}</a> has been blocked |
457bb213 | 42 | </div> |
2f1548fd C |
43 | </ng-container> |
44 | ||
310b5219 | 45 | <ng-container *ngSwitchCase="UserNotificationType.NEW_ABUSE_FOR_MODERATORS"> |
c41c0e28 | 46 | <my-global-icon iconName="flag" aria-hidden="true"></my-global-icon> |
457bb213 | 47 | |
cfde28ba | 48 | <div class="message" *ngIf="notification.videoUrl" i18n> |
d573926e | 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> |
457bb213 | 50 | </div> |
cfde28ba C |
51 | |
52 | <div class="message" *ngIf="notification.commentUrl" i18n> | |
d573926e | 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> |
cfde28ba C |
54 | </div> |
55 | ||
56 | <div class="message" *ngIf="notification.accountUrl" i18n> | |
d573926e | 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> |
cfde28ba C |
58 | </div> |
59 | ||
60 | <!-- Deleted entity associated to the abuse --> | |
61 | <div class="message" *ngIf="!notification.videoUrl && !notification.commentUrl && !notification.accountUrl" i18n> | |
d573926e C |
62 | <a (click)="markAsRead(notification)" [routerLink]="notification.abuseUrl" [queryParams]="notification.abuseQueryParams">A new abuse</a> has been created |
63 | </div> | |
64 | </ng-container> | |
65 | ||
66 | <ng-container *ngSwitchCase="UserNotificationType.ABUSE_STATE_CHANGE"> | |
67 | <my-global-icon iconName="flag" aria-hidden="true"></my-global-icon> | |
68 | ||
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> | |
73 | </div> | |
74 | </ng-container> | |
75 | ||
76 | <ng-container *ngSwitchCase="UserNotificationType.ABUSE_NEW_MESSAGE"> | |
77 | <my-global-icon iconName="flag" aria-hidden="true"></my-global-icon> | |
78 | ||
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 | |
cfde28ba | 81 | </div> |
2f1548fd C |
82 | </ng-container> |
83 | ||
3487330d | 84 | <ng-container *ngSwitchCase="UserNotificationType.VIDEO_AUTO_BLACKLIST_FOR_MODERATORS"> |
adcf9212 | 85 | <my-global-icon iconName="no" aria-hidden="true"></my-global-icon> |
7ccddd7b | 86 | |
ee2b7df0 | 87 | <div class="message" i18n> |
3487330d | 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> |
7ccddd7b JM |
89 | </div> |
90 | </ng-container> | |
91 | ||
ee2b7df0 | 92 | <ng-container *ngSwitchCase="UserNotificationType.NEW_COMMENT_ON_MY_VIDEO"> |
c5c09c1e RK |
93 | <ng-container *ngIf="notification.comment; then hasComment; else noComment"></ng-container> |
94 | ||
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" /> | |
98 | </a> | |
d95d1559 | 99 | |
c5c09c1e RK |
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> | |
102 | </div> | |
103 | </ng-template> | |
104 | ||
105 | <ng-template #noComment> | |
adcf9212 | 106 | <my-global-icon iconName="alert" aria-hidden="true"></my-global-icon> |
d95d1559 | 107 | |
c5c09c1e RK |
108 | <div class="message" i18n> |
109 | The notification concerns a comment now unavailable | |
110 | </div> | |
111 | </ng-template> | |
2f1548fd C |
112 | </ng-container> |
113 | ||
ee2b7df0 | 114 | <ng-container *ngSwitchCase="UserNotificationType.MY_VIDEO_PUBLISHED"> |
c41c0e28 | 115 | <my-global-icon iconName="film" aria-hidden="true"></my-global-icon> |
457bb213 | 116 | |
ee2b7df0 | 117 | <div class="message" i18n> |
457bb213 C |
118 | Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.video.name }}</a> has been published |
119 | </div> | |
2f1548fd C |
120 | </ng-container> |
121 | ||
ee2b7df0 | 122 | <ng-container *ngSwitchCase="UserNotificationType.MY_VIDEO_IMPORT_SUCCESS"> |
6ad971d5 | 123 | <my-global-icon iconName="cloud-download" aria-hidden="true"></my-global-icon> |
457bb213 | 124 | |
ee2b7df0 | 125 | <div class="message" i18n> |
6d28a505 | 126 | <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl || notification.videoImportUrl">Your video import</a> {{ notification.videoImportIdentifier }} succeeded |
457bb213 | 127 | </div> |
2f1548fd C |
128 | </ng-container> |
129 | ||
ee2b7df0 | 130 | <ng-container *ngSwitchCase="UserNotificationType.MY_VIDEO_IMPORT_ERROR"> |
6ad971d5 | 131 | <my-global-icon iconName="cloud-error" aria-hidden="true"></my-global-icon> |
457bb213 | 132 | |
ee2b7df0 | 133 | <div class="message" i18n> |
457bb213 C |
134 | <a (click)="markAsRead(notification)" [routerLink]="notification.videoImportUrl">Your video import</a> {{ notification.videoImportIdentifier }} failed |
135 | </div> | |
2f1548fd C |
136 | </ng-container> |
137 | ||
ee2b7df0 | 138 | <ng-container *ngSwitchCase="UserNotificationType.NEW_USER_REGISTRATION"> |
adcf9212 | 139 | <my-global-icon iconName="user-add" aria-hidden="true"></my-global-icon> |
457bb213 | 140 | |
ee2b7df0 | 141 | <div class="message" i18n> |
c5c09c1e | 142 | User <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.account.name }}</a> registered on your instance |
457bb213 | 143 | </div> |
2f1548fd C |
144 | </ng-container> |
145 | ||
ee2b7df0 | 146 | <ng-container *ngSwitchCase="UserNotificationType.NEW_FOLLOW"> |
c5c09c1e RK |
147 | <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl"> |
148 | <img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.actorFollow.follower.avatarUrl" /> | |
149 | </a> | |
2f1548fd | 150 | |
ee2b7df0 | 151 | <div class="message" i18n> |
457bb213 C |
152 | <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.actorFollow.follower.displayName }}</a> is following |
153 | ||
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> | |
156 | </div> | |
2f1548fd C |
157 | </ng-container> |
158 | ||
ee2b7df0 | 159 | <ng-container *ngSwitchCase="UserNotificationType.COMMENT_MENTION"> |
c5c09c1e RK |
160 | <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl"> |
161 | <img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.comment.account.avatarUrl" /> | |
162 | </a> | |
457bb213 | 163 | |
ee2b7df0 | 164 | <div class="message" i18n> |
0f80cb03 | 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> |
457bb213 | 166 | </div> |
2f1548fd | 167 | </ng-container> |
8ce1ba6e | 168 | |
ee2b7df0 | 169 | <ng-container *ngSwitchCase="UserNotificationType.NEW_INSTANCE_FOLLOWER"> |
adcf9212 | 170 | <my-global-icon iconName="users" aria-hidden="true"></my-global-icon> |
8ce1ba6e | 171 | |
ee2b7df0 | 172 | <div class="message" i18n> |
ce78f1f6 C |
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> | |
8ce1ba6e C |
175 | </div> |
176 | </ng-container> | |
e1b49ee5 | 177 | |
ee2b7df0 | 178 | <ng-container *ngSwitchCase="UserNotificationType.AUTO_INSTANCE_FOLLOWING"> |
adcf9212 | 179 | <my-global-icon iconName="users" aria-hidden="true"></my-global-icon> |
e1b49ee5 | 180 | |
ee2b7df0 | 181 | <div class="message" i18n> |
e1b49ee5 C |
182 | Your instance automatically followed <a (click)="markAsRead(notification)" [routerLink]="notification.instanceFollowUrl">{{ notification.actorFollow.following.host }}</a> |
183 | </div> | |
184 | </ng-container> | |
c5c09c1e RK |
185 | |
186 | <ng-container *ngSwitchDefault> | |
adcf9212 | 187 | <my-global-icon iconName="alert" aria-hidden="true"></my-global-icon> |
c5c09c1e RK |
188 | |
189 | <div class="message" i18n> | |
dc5bb5ce | 190 | The notification points to content now unavailable |
c5c09c1e RK |
191 | </div> |
192 | </ng-container> | |
457bb213 | 193 | </ng-container> |
2f1548fd | 194 | |
c5c09c1e | 195 | <div [title]="notification.createdAt" class="from-date">{{ notification.createdAt | myFromNow }}</div> |
2f1548fd C |
196 | </div> |
197 | </div> |