]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/users/user-notifications.component.html
smaller miniature average size in fluid grid, updated admin instructions for global...
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / 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
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>
21 <my-global-icon iconName="alert"></my-global-icon>
22
23 <div class="message" i18n>
24 The notification concerns a video now unavailable
25 </div>
26 </ng-template>
2f1548fd
C
27 </ng-container>
28
ee2b7df0 29 <ng-container *ngSwitchCase="UserNotificationType.UNBLACKLIST_ON_MY_VIDEO">
457bb213
C
30 <my-global-icon iconName="undo"></my-global-icon>
31
ee2b7df0 32 <div class="message" i18n>
457bb213
C
33 Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.video.name }}</a> has been unblacklisted
34 </div>
2f1548fd
C
35 </ng-container>
36
ee2b7df0 37 <ng-container *ngSwitchCase="UserNotificationType.BLACKLIST_ON_MY_VIDEO">
457bb213
C
38 <my-global-icon iconName="no"></my-global-icon>
39
ee2b7df0 40 <div class="message" i18n>
457bb213
C
41 Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.videoBlacklist.video.name }}</a> has been blacklisted
42 </div>
2f1548fd
C
43 </ng-container>
44
ee2b7df0 45 <ng-container *ngSwitchCase="UserNotificationType.NEW_VIDEO_ABUSE_FOR_MODERATORS">
457bb213
C
46 <my-global-icon iconName="alert"></my-global-icon>
47
ee2b7df0 48 <div class="message" i18n>
457bb213
C
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>
50 </div>
2f1548fd
C
51 </ng-container>
52
ee2b7df0 53 <ng-container *ngSwitchCase="UserNotificationType.VIDEO_AUTO_BLACKLIST_FOR_MODERATORS">
7ccddd7b
JM
54 <my-global-icon iconName="no"></my-global-icon>
55
ee2b7df0 56 <div class="message" i18n>
e1b49ee5 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>
7ccddd7b
JM
58 </div>
59 </ng-container>
60
ee2b7df0 61 <ng-container *ngSwitchCase="UserNotificationType.NEW_COMMENT_ON_MY_VIDEO">
c5c09c1e
RK
62 <ng-container *ngIf="notification.comment; then hasComment; else noComment"></ng-container>
63
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" />
67 </a>
68
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>
71 </div>
72 </ng-template>
73
74 <ng-template #noComment>
75 <my-global-icon iconName="alert"></my-global-icon>
76
77 <div class="message" i18n>
78 The notification concerns a comment now unavailable
79 </div>
80 </ng-template>
2f1548fd
C
81 </ng-container>
82
ee2b7df0 83 <ng-container *ngSwitchCase="UserNotificationType.MY_VIDEO_PUBLISHED">
6ad971d5 84 <my-global-icon iconName="sparkle" aria-hidden="true"></my-global-icon>
457bb213 85
ee2b7df0 86 <div class="message" i18n>
457bb213
C
87 Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.video.name }}</a> has been published
88 </div>
2f1548fd
C
89 </ng-container>
90
ee2b7df0 91 <ng-container *ngSwitchCase="UserNotificationType.MY_VIDEO_IMPORT_SUCCESS">
6ad971d5 92 <my-global-icon iconName="cloud-download" aria-hidden="true"></my-global-icon>
457bb213 93
ee2b7df0 94 <div class="message" i18n>
6d28a505 95 <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl || notification.videoImportUrl">Your video import</a> {{ notification.videoImportIdentifier }} succeeded
457bb213 96 </div>
2f1548fd
C
97 </ng-container>
98
ee2b7df0 99 <ng-container *ngSwitchCase="UserNotificationType.MY_VIDEO_IMPORT_ERROR">
6ad971d5 100 <my-global-icon iconName="cloud-error" aria-hidden="true"></my-global-icon>
457bb213 101
ee2b7df0 102 <div class="message" i18n>
457bb213
C
103 <a (click)="markAsRead(notification)" [routerLink]="notification.videoImportUrl">Your video import</a> {{ notification.videoImportIdentifier }} failed
104 </div>
2f1548fd
C
105 </ng-container>
106
ee2b7df0 107 <ng-container *ngSwitchCase="UserNotificationType.NEW_USER_REGISTRATION">
457bb213
C
108 <my-global-icon iconName="user-add"></my-global-icon>
109
ee2b7df0 110 <div class="message" i18n>
c5c09c1e 111 User <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.account.name }}</a> registered on your instance
457bb213 112 </div>
2f1548fd
C
113 </ng-container>
114
ee2b7df0 115 <ng-container *ngSwitchCase="UserNotificationType.NEW_FOLLOW">
c5c09c1e
RK
116 <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">
117 <img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.actorFollow.follower.avatarUrl" />
118 </a>
2f1548fd 119
ee2b7df0 120 <div class="message" i18n>
457bb213
C
121 <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.actorFollow.follower.displayName }}</a> is following
122
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>
125 </div>
2f1548fd
C
126 </ng-container>
127
ee2b7df0 128 <ng-container *ngSwitchCase="UserNotificationType.COMMENT_MENTION">
c5c09c1e
RK
129 <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">
130 <img alt="" aria-labelledby="avatar" class="avatar" [src]="notification.comment.account.avatarUrl" />
131 </a>
457bb213 132
ee2b7df0 133 <div class="message" i18n>
0f80cb03 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>
457bb213 135 </div>
2f1548fd 136 </ng-container>
8ce1ba6e 137
ee2b7df0 138 <ng-container *ngSwitchCase="UserNotificationType.NEW_INSTANCE_FOLLOWER">
8ce1ba6e
C
139 <my-global-icon iconName="users"></my-global-icon>
140
ee2b7df0 141 <div class="message" i18n>
ce78f1f6
C
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>
8ce1ba6e
C
144 </div>
145 </ng-container>
e1b49ee5 146
ee2b7df0 147 <ng-container *ngSwitchCase="UserNotificationType.AUTO_INSTANCE_FOLLOWING">
e1b49ee5
C
148 <my-global-icon iconName="users"></my-global-icon>
149
ee2b7df0 150 <div class="message" i18n>
e1b49ee5
C
151 Your instance automatically followed <a (click)="markAsRead(notification)" [routerLink]="notification.instanceFollowUrl">{{ notification.actorFollow.following.host }}</a>
152 </div>
153 </ng-container>
c5c09c1e
RK
154
155 <ng-container *ngSwitchDefault>
156 <my-global-icon iconName="alert"></my-global-icon>
157
158 <div class="message" i18n>
159 The notification points to a content now unavailable
160 </div>
161 </ng-container>
457bb213 162 </ng-container>
2f1548fd 163
c5c09c1e 164 <div [title]="notification.createdAt" class="from-date">{{ notification.createdAt | myFromNow }}</div>
2f1548fd
C
165 </div>
166</div>