diff options
author | Chocobozzz <me@florianbigard.com> | 2019-01-08 11:26:41 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-01-09 11:15:15 +0100 |
commit | 2f1548fda32c3ba9e53913270394eedfacd55986 (patch) | |
tree | afee28df36a9e00f921603d9091e5d08d5818159 /client/src/app/shared/users/user-notifications.component.html | |
parent | f7cc67b455a12ccae9b0ea16876d166720364357 (diff) | |
download | PeerTube-2f1548fda32c3ba9e53913270394eedfacd55986.tar.gz PeerTube-2f1548fda32c3ba9e53913270394eedfacd55986.tar.zst PeerTube-2f1548fda32c3ba9e53913270394eedfacd55986.zip |
Add notifications in the client
Diffstat (limited to 'client/src/app/shared/users/user-notifications.component.html')
-rw-r--r-- | client/src/app/shared/users/user-notifications.component.html | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/client/src/app/shared/users/user-notifications.component.html b/client/src/app/shared/users/user-notifications.component.html new file mode 100644 index 000000000..86379d941 --- /dev/null +++ b/client/src/app/shared/users/user-notifications.component.html | |||
@@ -0,0 +1,61 @@ | |||
1 | <div *ngIf="componentPagination.totalItems === 0" class="no-notification" i18n>You don't have notifications.</div> | ||
2 | |||
3 | <div class="notifications" myInfiniteScroller [autoInit]="true" (nearOfBottom)="onNearOfBottom()"> | ||
4 | <div *ngFor="let notification of notifications" class="notification" [ngClass]="{ unread: !notification.read }"> | ||
5 | |||
6 | <div [ngSwitch]="notification.type"> | ||
7 | <ng-container i18n *ngSwitchCase="UserNotificationType.NEW_VIDEO_FROM_SUBSCRIPTION"> | ||
8 | {{ notification.video.channel.displayName }} published a <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">new video</a> | ||
9 | </ng-container> | ||
10 | |||
11 | <ng-container i18n *ngSwitchCase="UserNotificationType.UNBLACKLIST_ON_MY_VIDEO"> | ||
12 | Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.video.name }}</a> has been unblacklisted | ||
13 | </ng-container> | ||
14 | |||
15 | <ng-container i18n *ngSwitchCase="UserNotificationType.BLACKLIST_ON_MY_VIDEO"> | ||
16 | Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.videoBlacklist.video.name }}</a> has been blacklisted | ||
17 | </ng-container> | ||
18 | |||
19 | <ng-container i18n *ngSwitchCase="UserNotificationType.NEW_VIDEO_ABUSE_FOR_MODERATORS"> | ||
20 | <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> | ||
21 | </ng-container> | ||
22 | |||
23 | <ng-container i18n *ngSwitchCase="UserNotificationType.NEW_COMMENT_ON_MY_VIDEO"> | ||
24 | {{ notification.comment.account.displayName }} commented your video <a (click)="markAsRead(notification)" [routerLink]="notification.commentUrl">{{ notification.comment.video.name }}</a> | ||
25 | </ng-container> | ||
26 | |||
27 | <ng-container i18n *ngSwitchCase="UserNotificationType.MY_VIDEO_PUBLISHED"> | ||
28 | Your video <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">{{ notification.video.name }}</a> has been published | ||
29 | </ng-container> | ||
30 | |||
31 | <ng-container i18n *ngSwitchCase="UserNotificationType.MY_VIDEO_IMPORT_SUCCESS"> | ||
32 | <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">Your video import</a> {{ notification.videoImportIdentifier }} succeeded | ||
33 | </ng-container> | ||
34 | |||
35 | <ng-container i18n *ngSwitchCase="UserNotificationType.MY_VIDEO_IMPORT_ERROR"> | ||
36 | <a (click)="markAsRead(notification)" [routerLink]="notification.videoImportUrl">Your video import</a> {{ notification.videoImportIdentifier }} failed | ||
37 | </ng-container> | ||
38 | |||
39 | <ng-container i18n *ngSwitchCase="UserNotificationType.NEW_USER_REGISTRATION"> | ||
40 | User <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.account.name }} registered</a> on your instance | ||
41 | </ng-container> | ||
42 | |||
43 | <ng-container i18n *ngSwitchCase="UserNotificationType.NEW_FOLLOW"> | ||
44 | <a (click)="markAsRead(notification)" [routerLink]="notification.accountUrl">{{ notification.actorFollow.follower.displayName }}</a> is following | ||
45 | |||
46 | <ng-container *ngIf="notification.actorFollow.following.type === 'channel'"> | ||
47 | your channel {{ notification.actorFollow.following.displayName }} | ||
48 | </ng-container> | ||
49 | <ng-container *ngIf="notification.actorFollow.following.type === 'account'">your account</ng-container> | ||
50 | </ng-container> | ||
51 | |||
52 | <ng-container i18n *ngSwitchCase="UserNotificationType.COMMENT_MENTION"> | ||
53 | {{ notification.comment.account.displayName }} mentioned you on <a (click)="markAsRead(notification)" [routerLink]="notification.commentUrl">video {{ notification.comment.video.name }}</a> | ||
54 | </ng-container> | ||
55 | </div> | ||
56 | |||
57 | <div i18n title="Mark as read" class="mark-as-read"> | ||
58 | <div class="glyphicon glyphicon-ok" (click)="markAsRead(notification)"></div> | ||
59 | </div> | ||
60 | </div> | ||
61 | </div> | ||