aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/comment/video-comments.component.html
blob: 5c6908150777069ae7c31f88e7fc354b0b23362f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<div>
  <div class="title-page title-page-single">
    Comments
  </div>

  <my-video-comment-add
    *ngIf="isUserLoggedIn()"
    [video]="video"
    (commentCreated)="onCommentThreadCreated($event)"
  ></my-video-comment-add>

  <div
    class="comment-threads"
    infiniteScroll
    [infiniteScrollUpDistance]="1.5"
    [infiniteScrollDistance]="0.5"
    (scrolled)="onNearOfBottom()"
  >
    <div *ngFor="let comment of comments">
      <my-video-comment
        [comment]="comment"
        [video]="video"
        [inReplyToCommentId]="inReplyToCommentId"
        [commentTree]="threadComments[comment.id]"
        (wantedToReply)="onWantedToReply($event)"
        (resetReply)="onResetReply()"
      ></my-video-comment>

      <div *ngIf="comment.totalReplies !== 0 && !threadComments[comment.id]" (click)="viewReplies(comment)" class="view-replies">
        View all {{ comment.totalReplies }} replies

        <span *ngIf="!threadLoading[comment.id]" class="glyphicon glyphicon-menu-down"></span>
        <my-loader class="comment-thread-loading" [loading]="threadLoading[comment.id]"></my-loader>
      </div>
    </div>
  </div>
</div>