]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/videos/+video-watch/comment/video-comments.component.html
refactor subscribe button and comment-add for visitor-interact UX (#1100)
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / comment / video-comments.component.html
1 <div>
2 <div class="title-block">
3 <div i18n class="title-page title-page-single">
4 Comments
5 </div>
6 <my-help
7 *ngIf="video.commentsEnabled === true" helpType="custom" i18n-customHtml
8 customHtml="You can either comment on the page of your instance where this video is federated with your PeerTube account, or via any ActivityPub-capable fediverse instance. For instance with Mastodon or Pleroma you can type in the search box <strong>@{{video.account.name}}@{{video.account.host}}</strong> and find back the video. Direct commenting capabilities are being worked on in <a href='https://github.com/Chocobozzz/PeerTube/issues/224'>#224</a>."></my-help>
9 </div>
10
11 <ng-template [ngIf]="video.commentsEnabled === true">
12 <my-video-comment-add
13 [video]="video"
14 [user]="user"
15 (commentCreated)="onCommentThreadCreated($event)"
16 ></my-video-comment-add>
17
18 <div *ngIf="componentPagination.totalItems === 0 && comments.length === 0" i18n>No comments.</div>
19
20 <div
21 class="comment-threads"
22 myInfiniteScroller
23 [autoInit]="true"
24 (nearOfBottom)="onNearOfBottom()"
25 >
26 <div #commentHighlightBlock id="highlighted-comment">
27 <my-video-comment
28 *ngIf="highlightedThread"
29 [comment]="highlightedThread"
30 [video]="video"
31 [inReplyToCommentId]="inReplyToCommentId"
32 [commentTree]="threadComments[highlightedThread.id]"
33 [highlightedComment]="true"
34 (wantedToReply)="onWantedToReply($event)"
35 (wantedToDelete)="onWantedToDelete($event)"
36 (threadCreated)="onThreadCreated($event)"
37 (resetReply)="onResetReply()"
38 ></my-video-comment>
39 </div>
40
41 <div *ngFor="let comment of comments">
42 <my-video-comment
43 *ngIf="!highlightedThread || comment.id !== highlightedThread.id"
44 [comment]="comment"
45 [video]="video"
46 [inReplyToCommentId]="inReplyToCommentId"
47 [commentTree]="threadComments[comment.id]"
48 (wantedToReply)="onWantedToReply($event)"
49 (wantedToDelete)="onWantedToDelete($event)"
50 (threadCreated)="onThreadCreated($event)"
51 (resetReply)="onResetReply()"
52 ></my-video-comment>
53
54 <div *ngIf="comment.totalReplies !== 0 && !threadComments[comment.id]" (click)="viewReplies(comment.id)" class="view-replies">
55 <ng-container i18n>View all {{ comment.totalReplies }} replies</ng-container>
56
57 <span *ngIf="!threadLoading[comment.id]" class="glyphicon glyphicon-menu-down"></span>
58 <my-loader class="comment-thread-loading" [loading]="threadLoading[comment.id]"></my-loader>
59 </div>
60 </div>
61 </div>
62 </ng-template>
63
64 <div *ngIf="video.commentsEnabled === false" i18n>
65 Comments are disabled.
66 </div>
67 </div>