]>
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> |
d95d1559 | 49 | <a (click)="markAsRead(notification)" [routerLink]="notification.abuseUrl">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> | |
53 | <a (click)="markAsRead(notification)" [routerLink]="notification.abuseUrl">A new comment abuse</a> has been created on video <a (click)="markAsRead(notification)" [routerLink]="notification.commentUrl">{{ notification.abuse.comment.video.name }}</a> | |
54 | </div> | |
55 | ||
56 | <div class="message" *ngIf="notification.accountUrl" i18n> | |
57 | <a (click)="markAsRead(notification)" [routerLink]="notification.abuseUrl">A new account abuse</a> has been created on account <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.abuse.account.displayName }}</a> | |
58 | </div> | |
59 | ||
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">A new abuse</a> has been created | |
63 | </div> | |
2f1548fd C |
64 | </ng-container> |
65 | ||
3487330d | 66 | <ng-container *ngSwitchCase="UserNotificationType.VIDEO_AUTO_BLACKLIST_FOR_MODERATORS"> |
adcf9212 | 67 | <my-global-icon iconName="no" aria-hidden="true"></my-global-icon> |
7ccddd7b | 68 | |
ee2b7df0 | 69 | <div class="message" i18n> |
3487330d | 70 | 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 |
71 | </div> |
72 | </ng-container> | |
73 | ||
ee2b7df0 | 74 | <ng-container *ngSwitchCase="UserNotificationType.NEW_COMMENT_ON_MY_VIDEO"> |
c5c09c1e RK |
75 | <ng-container *ngIf="notification.comment; then hasComment; else noComment"></ng-container> |
76 | ||
77 | <ng-template #hasComment> | |
78 | <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl"> | |
79 | <img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.comment.account.avatarUrl" /> | |
80 | </a> | |
d95d1559 | 81 | |
c5c09c1e RK |
82 | <div class="message" i18n> |
83 | <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> | |
84 | </div> | |
85 | </ng-template> | |
86 | ||
87 | <ng-template #noComment> | |
adcf9212 | 88 | <my-global-icon iconName="alert" aria-hidden="true"></my-global-icon> |
d95d1559 | 89 | |
c5c09c1e RK |
90 | <div class="message" i18n> |
91 | The notification concerns a comment now unavailable | |
92 | </div> | |
93 | </ng-template> | |
2f1548fd C |
94 | </ng-container> |
95 | ||
ee2b7df0 | 96 | <ng-container *ngSwitchCase="UserNotificationType.MY_VIDEO_PUBLISHED"> |
c41c0e28 | 97 | <my-global-icon iconName="film" aria-hidden="true"></my-global-icon> |
457bb213 | 98 | |
ee2b7df0 | 99 | <div class="message" i18n> |
457bb213 C |
100 | Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.video.name }}</a> has been published |
101 | </div> | |
2f1548fd C |
102 | </ng-container> |
103 | ||
ee2b7df0 | 104 | <ng-container *ngSwitchCase="UserNotificationType.MY_VIDEO_IMPORT_SUCCESS"> |
6ad971d5 | 105 | <my-global-icon iconName="cloud-download" aria-hidden="true"></my-global-icon> |
457bb213 | 106 | |
ee2b7df0 | 107 | <div class="message" i18n> |
6d28a505 | 108 | <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl || notification.videoImportUrl">Your video import</a> {{ notification.videoImportIdentifier }} succeeded |
457bb213 | 109 | </div> |
2f1548fd C |
110 | </ng-container> |
111 | ||
ee2b7df0 | 112 | <ng-container *ngSwitchCase="UserNotificationType.MY_VIDEO_IMPORT_ERROR"> |
6ad971d5 | 113 | <my-global-icon iconName="cloud-error" aria-hidden="true"></my-global-icon> |
457bb213 | 114 | |
ee2b7df0 | 115 | <div class="message" i18n> |
457bb213 C |
116 | <a (click)="markAsRead(notification)" [routerLink]="notification.videoImportUrl">Your video import</a> {{ notification.videoImportIdentifier }} failed |
117 | </div> | |
2f1548fd C |
118 | </ng-container> |
119 | ||
ee2b7df0 | 120 | <ng-container *ngSwitchCase="UserNotificationType.NEW_USER_REGISTRATION"> |
adcf9212 | 121 | <my-global-icon iconName="user-add" aria-hidden="true"></my-global-icon> |
457bb213 | 122 | |
ee2b7df0 | 123 | <div class="message" i18n> |
c5c09c1e | 124 | User <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.account.name }}</a> registered on your instance |
457bb213 | 125 | </div> |
2f1548fd C |
126 | </ng-container> |
127 | ||
ee2b7df0 | 128 | <ng-container *ngSwitchCase="UserNotificationType.NEW_FOLLOW"> |
c5c09c1e RK |
129 | <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl"> |
130 | <img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.actorFollow.follower.avatarUrl" /> | |
131 | </a> | |
2f1548fd | 132 | |
ee2b7df0 | 133 | <div class="message" i18n> |
457bb213 C |
134 | <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.actorFollow.follower.displayName }}</a> is following |
135 | ||
136 | <ng-container *ngIf="notification.actorFollow.following.type === 'channel'">your channel {{ notification.actorFollow.following.displayName }}</ng-container> | |
137 | <ng-container *ngIf="notification.actorFollow.following.type === 'account'">your account</ng-container> | |
138 | </div> | |
2f1548fd C |
139 | </ng-container> |
140 | ||
ee2b7df0 | 141 | <ng-container *ngSwitchCase="UserNotificationType.COMMENT_MENTION"> |
c5c09c1e RK |
142 | <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl"> |
143 | <img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.comment.account.avatarUrl" /> | |
144 | </a> | |
457bb213 | 145 | |
ee2b7df0 | 146 | <div class="message" i18n> |
0f80cb03 | 147 | <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 | 148 | </div> |
2f1548fd | 149 | </ng-container> |
8ce1ba6e | 150 | |
ee2b7df0 | 151 | <ng-container *ngSwitchCase="UserNotificationType.NEW_INSTANCE_FOLLOWER"> |
adcf9212 | 152 | <my-global-icon iconName="users" aria-hidden="true"></my-global-icon> |
8ce1ba6e | 153 | |
ee2b7df0 | 154 | <div class="message" i18n> |
ce78f1f6 C |
155 | Your instance has <a (click)="markAsRead(notification)" [routerLink]="notification.instanceFollowUrl">a new follower</a> ({{ notification.actorFollow?.follower.host }}) |
156 | <ng-container *ngIf="notification.actorFollow?.state === 'pending'"> awaiting your approval</ng-container> | |
8ce1ba6e C |
157 | </div> |
158 | </ng-container> | |
e1b49ee5 | 159 | |
ee2b7df0 | 160 | <ng-container *ngSwitchCase="UserNotificationType.AUTO_INSTANCE_FOLLOWING"> |
adcf9212 | 161 | <my-global-icon iconName="users" aria-hidden="true"></my-global-icon> |
e1b49ee5 | 162 | |
ee2b7df0 | 163 | <div class="message" i18n> |
e1b49ee5 C |
164 | Your instance automatically followed <a (click)="markAsRead(notification)" [routerLink]="notification.instanceFollowUrl">{{ notification.actorFollow.following.host }}</a> |
165 | </div> | |
166 | </ng-container> | |
c5c09c1e RK |
167 | |
168 | <ng-container *ngSwitchDefault> | |
adcf9212 | 169 | <my-global-icon iconName="alert" aria-hidden="true"></my-global-icon> |
c5c09c1e RK |
170 | |
171 | <div class="message" i18n> | |
172 | The notification points to a content now unavailable | |
173 | </div> | |
174 | </ng-container> | |
457bb213 | 175 | </ng-container> |
2f1548fd | 176 | |
c5c09c1e | 177 | <div [title]="notification.createdAt" class="from-date">{{ notification.createdAt | myFromNow }}</div> |
2f1548fd C |
178 | </div> |
179 | </div> |