]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/shared-main/users/user-notifications.component.html
Bumped to version v5.2.1
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / users / user-notifications.component.html
CommitLineData
2f1548fd
C
1<div *ngIf="componentPagination.totalItems === 0" class="no-notification" i18n>You don't have notifications.</div>
2
dd24f1bb 3<div class="notifications" myInfiniteScroller (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()">
d0fbc9fd 4 <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->
457bb213 5 <div *ngFor="let notification of notifications" class="notification" [ngClass]="{ unread: !notification.read }" (click)="markAsRead(notification)">
2f1548fd 6
457bb213 7 <ng-container [ngSwitch]="notification.type">
829523cf 8 <ng-container *ngSwitchCase="1"> <!-- UserNotificationType.NEW_VIDEO_FROM_SUBSCRIPTION -->
c5c09c1e
RK
9 <ng-container *ngIf="notification.video; then hasVideo; else noVideo"></ng-container>
10
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" />
14 </a>
15
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>
18 </div>
19 </ng-template>
20
21 <ng-template #noVideo>
adcf9212 22 <my-global-icon iconName="alert" aria-hidden="true"></my-global-icon>
d95d1559 23
c5c09c1e
RK
24 <div class="message" i18n>
25 The notification concerns a video now unavailable
26 </div>
27 </ng-template>
2f1548fd
C
28 </ng-container>
29
829523cf 30 <ng-container *ngSwitchCase="5"> <!-- UserNotificationType.UNBLACKLIST_ON_MY_VIDEO -->
adcf9212 31 <my-global-icon iconName="undo" aria-hidden="true"></my-global-icon>
457bb213 32
ee2b7df0 33 <div class="message" i18n>
5baee5fc 34 Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.video.name }}</a> has been unblocked
457bb213 35 </div>
2f1548fd
C
36 </ng-container>
37
829523cf 38 <ng-container *ngSwitchCase="4"> <!-- UserNotificationType.BLACKLIST_ON_MY_VIDEO -->
adcf9212 39 <my-global-icon iconName="no" aria-hidden="true"></my-global-icon>
457bb213 40
ee2b7df0 41 <div class="message" i18n>
5baee5fc 42 Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.videoBlacklist.video.name }}</a> has been blocked
457bb213 43 </div>
2f1548fd
C
44 </ng-container>
45
829523cf 46 <ng-container *ngSwitchCase="3"> <!-- UserNotificationType.NEW_ABUSE_FOR_MODERATORS -->
c41c0e28 47 <my-global-icon iconName="flag" aria-hidden="true"></my-global-icon>
457bb213 48
cfde28ba 49 <div class="message" *ngIf="notification.videoUrl" i18n>
d573926e 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>
457bb213 51 </div>
cfde28ba
C
52
53 <div class="message" *ngIf="notification.commentUrl" i18n>
d573926e 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>
cfde28ba
C
55 </div>
56
57 <div class="message" *ngIf="notification.accountUrl" i18n>
d573926e 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>
cfde28ba
C
59 </div>
60
61 <!-- Deleted entity associated to the abuse -->
62 <div class="message" *ngIf="!notification.videoUrl && !notification.commentUrl && !notification.accountUrl" i18n>
d573926e
C
63 <a (click)="markAsRead(notification)" [routerLink]="notification.abuseUrl" [queryParams]="notification.abuseQueryParams">A new abuse</a> has been created
64 </div>
65 </ng-container>
66
829523cf 67 <ng-container *ngSwitchCase="15"> <!-- UserNotificationType.ABUSE_STATE_CHANGE -->
d573926e
C
68 <my-global-icon iconName="flag" aria-hidden="true"></my-global-icon>
69
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>
74 </div>
75 </ng-container>
76
829523cf 77 <ng-container *ngSwitchCase="16"> <!-- UserNotificationType.ABUSE_NEW_MESSAGE -->
d573926e
C
78 <my-global-icon iconName="flag" aria-hidden="true"></my-global-icon>
79
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
cfde28ba 82 </div>
2f1548fd
C
83 </ng-container>
84
829523cf 85 <ng-container *ngSwitchCase="12"> <!-- UserNotificationType.VIDEO_AUTO_BLACKLIST_FOR_MODERATORS -->
adcf9212 86 <my-global-icon iconName="no" aria-hidden="true"></my-global-icon>
7ccddd7b 87
ee2b7df0 88 <div class="message" i18n>
3487330d 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>
7ccddd7b
JM
90 </div>
91 </ng-container>
92
829523cf 93 <ng-container *ngSwitchCase="2">
61fd9834 94 <ng-container *ngIf="notification.comment">
c5c09c1e
RK
95 <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">
96 <img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.comment.account.avatarUrl" />
97 </a>
d95d1559 98
c5c09c1e
RK
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>
101 </div>
61fd9834 102 </ng-container>
c5c09c1e 103
61fd9834 104 <ng-container *ngIf="!notification.comment">
adcf9212 105 <my-global-icon iconName="alert" aria-hidden="true"></my-global-icon>
d95d1559 106
c5c09c1e
RK
107 <div class="message" i18n>
108 The notification concerns a comment now unavailable
109 </div>
61fd9834 110 </ng-container>
2f1548fd
C
111 </ng-container>
112
829523cf 113 <ng-container *ngSwitchCase="6"> <!-- UserNotificationType.MY_VIDEO_PUBLISHED -->
c41c0e28 114 <my-global-icon iconName="film" aria-hidden="true"></my-global-icon>
457bb213 115
ee2b7df0 116 <div class="message" i18n>
457bb213
C
117 Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.video.name }}</a> has been published
118 </div>
2f1548fd
C
119 </ng-container>
120
829523cf 121 <ng-container *ngSwitchCase="7"> <!-- UserNotificationType.MY_VIDEO_IMPORT_SUCCESS -->
6ad971d5 122 <my-global-icon iconName="cloud-download" aria-hidden="true"></my-global-icon>
457bb213 123
ee2b7df0 124 <div class="message" i18n>
6d28a505 125 <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl || notification.videoImportUrl">Your video import</a> {{ notification.videoImportIdentifier }} succeeded
457bb213 126 </div>
2f1548fd
C
127 </ng-container>
128
829523cf 129 <ng-container *ngSwitchCase="8"> <!-- UserNotificationType.MY_VIDEO_IMPORT_ERROR -->
6ad971d5 130 <my-global-icon iconName="cloud-error" aria-hidden="true"></my-global-icon>
457bb213 131
ee2b7df0 132 <div class="message" i18n>
457bb213
C
133 <a (click)="markAsRead(notification)" [routerLink]="notification.videoImportUrl">Your video import</a> {{ notification.videoImportIdentifier }} failed
134 </div>
2f1548fd
C
135 </ng-container>
136
829523cf 137 <ng-container *ngSwitchCase="9"> <!-- UserNotificationType.NEW_USER_REGISTRATION -->
adcf9212 138 <my-global-icon iconName="user-add" aria-hidden="true"></my-global-icon>
457bb213 139
ee2b7df0 140 <div class="message" i18n>
c5c09c1e 141 User <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.account.name }}</a> registered on your instance
457bb213 142 </div>
2f1548fd
C
143 </ng-container>
144
829523cf 145 <ng-container *ngSwitchCase="10"> <!-- UserNotificationType.NEW_FOLLOW -->
c5c09c1e
RK
146 <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">
147 <img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.actorFollow.follower.avatarUrl" />
148 </a>
2f1548fd 149
ee2b7df0 150 <div class="message" i18n>
457bb213
C
151 <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.actorFollow.follower.displayName }}</a> is following
152
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>
155 </div>
2f1548fd
C
156 </ng-container>
157
829523cf 158 <ng-container *ngSwitchCase="11">
61fd9834
C
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" />
162 </a>
457bb213 163
61fd9834
C
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>
166 </div>
167 </ng-container>
168
169 <ng-container *ngIf="!notification.comment">
170 <my-global-icon iconName="alert" aria-hidden="true"></my-global-icon>
171
172 <div class="message" i18n>
173 The notification concerns a comment now unavailable
174 </div>
175 </ng-container>
2f1548fd 176 </ng-container>
8ce1ba6e 177
829523cf 178 <ng-container *ngSwitchCase="13"> <!-- UserNotificationType.NEW_INSTANCE_FOLLOWER -->
adcf9212 179 <my-global-icon iconName="users" aria-hidden="true"></my-global-icon>
8ce1ba6e 180
ee2b7df0 181 <div class="message" i18n>
ce78f1f6
C
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>
8ce1ba6e
C
184 </div>
185 </ng-container>
e1b49ee5 186
829523cf 187 <ng-container *ngSwitchCase="14"> <!-- UserNotificationType.AUTO_INSTANCE_FOLLOWING -->
adcf9212 188 <my-global-icon iconName="users" aria-hidden="true"></my-global-icon>
e1b49ee5 189
ee2b7df0 190 <div class="message" i18n>
e1b49ee5
C
191 Your instance automatically followed <a (click)="markAsRead(notification)" [routerLink]="notification.instanceFollowUrl">{{ notification.actorFollow.following.host }}</a>
192 </div>
193 </ng-container>
c5c09c1e 194
32a18cbf
C
195 <ng-container *ngSwitchCase="17"> <!-- UserNotificationType.NEW_PLUGIN_VERSION -->
196 <my-global-icon iconName="cog" aria-hidden="true"></my-global-icon>
197
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 }}
200 </div>
201 </ng-container>
202
203 <ng-container *ngSwitchCase="18"> <!-- UserNotificationType.NEW_PEERTUBE_VERSION -->
204 <my-global-icon iconName="cog" aria-hidden="true"></my-global-icon>
205
206 <div class="message" i18n>
1808a1f8
C
207 <a (click)="markAsRead(notification)" [href]="notification.peertubeVersionLink" target="_blank" rel="noopener noreferrer">A new version of PeerTube</a> is available: {{ notification.peertube.latestVersion }}
208 </div>
209 </ng-container>
210
92e66e04 211 <ng-container *ngSwitchCase="19"> <!-- UserNotificationType.MY_VIDEO_STUDIO_EDITION_FINISHED -->
1808a1f8
C
212 <my-global-icon iconName="film" aria-hidden="true"></my-global-icon>
213
214 <div class="message" i18n>
215 Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.video.name }}</a> edition has finished
32a18cbf
C
216 </div>
217 </ng-container>
218
9589907c
C
219 <ng-container *ngSwitchCase="20"> <!-- UserNotificationType.NEW_USER_REGISTRATION_REQUEST -->
220 <my-global-icon iconName="user-add" aria-hidden="true"></my-global-icon>
221
222 <div class="message" i18n>
223 User <a (click)="markAsRead(notification)" [routerLink]="notification.registrationsUrl">{{ notification.registration.username }}</a> wants to register on your instance
224 </div>
225 </ng-container>
226
c5c09c1e 227 <ng-container *ngSwitchDefault>
adcf9212 228 <my-global-icon iconName="alert" aria-hidden="true"></my-global-icon>
c5c09c1e
RK
229
230 <div class="message" i18n>
dc5bb5ce 231 The notification points to content now unavailable
c5c09c1e
RK
232 </div>
233 </ng-container>
457bb213 234 </ng-container>
2f1548fd 235
c5c09c1e 236 <div [title]="notification.createdAt" class="from-date">{{ notification.createdAt | myFromNow }}</div>
2f1548fd
C
237 </div>
238</div>