]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/videos/+video-watch/comment/video-comments.component.html
Rewrite infinite scroll
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / comment / video-comments.component.html
1 <div>
2 <div class="title-page title-page-single">
3 Comments
4 </div>
5
6 <ng-template [ngIf]="video.commentsEnabled === true">
7 <my-video-comment-add
8 *ngIf="isUserLoggedIn()"
9 [video]="video"
10 [user]="user"
11 (commentCreated)="onCommentThreadCreated($event)"
12 ></my-video-comment-add>
13
14 <div *ngIf="componentPagination.totalItems === 0 && comments.length === 0">No comments.</div>
15
16 <div
17 class="comment-threads"
18 myInfiniteScroller
19 [autoLoading]="true"
20 (nearOfBottom)="onNearOfBottom()"
21 >
22 <div *ngFor="let comment of comments">
23 <my-video-comment
24 [comment]="comment"
25 [video]="video"
26 [inReplyToCommentId]="inReplyToCommentId"
27 [commentTree]="threadComments[comment.id]"
28 (wantedToReply)="onWantedToReply($event)"
29 (wantedToDelete)="onWantedToDelete($event)"
30 (threadCreated)="onThreadCreated($event)"
31 (resetReply)="onResetReply()"
32 ></my-video-comment>
33
34 <div *ngIf="comment.totalReplies !== 0 && !threadComments[comment.id]" (click)="viewReplies(comment)" class="view-replies">
35 View all {{ comment.totalReplies }} replies
36
37 <span *ngIf="!threadLoading[comment.id]" class="glyphicon glyphicon-menu-down"></span>
38 <my-loader class="comment-thread-loading" [loading]="threadLoading[comment.id]"></my-loader>
39 </div>
40 </div>
41 </div>
42 </ng-template>
43
44 <div *ngIf="video.commentsEnabled === false">
45 Comments are disabled.
46 </div>
47 </div>