PeerTube/client/src/app/videos/+video-watch/comment/video-comments.component.html

67 lines
2.3 KiB
HTML
Raw Normal View History

2017-12-27 16:11:53 +01:00
<div>
<div class="title-block">
2018-06-05 16:52:25 +02:00
<div i18n class="title-page title-page-single">
Comments
</div>
<my-video-feed [syndicationItems]="syndicationItems"></my-video-feed>
2017-12-27 16:11:53 +01:00
</div>
2018-01-03 10:12:36 +01:00
<ng-template [ngIf]="video.commentsEnabled === true">
<my-video-comment-add
[video]="video"
2018-01-03 17:25:47 +01:00
[user]="user"
2018-01-03 10:12:36 +01:00
(commentCreated)="onCommentThreadCreated($event)"
></my-video-comment-add>
2017-12-27 16:11:53 +01:00
2018-06-04 16:21:17 +02:00
<div *ngIf="componentPagination.totalItems === 0 && comments.length === 0" i18n>No comments.</div>
2017-12-27 16:11:53 +01:00
2018-01-03 10:12:36 +01:00
<div
class="comment-threads"
2018-02-13 14:11:05 +01:00
myInfiniteScroller
[autoInit]="true"
2018-02-13 14:11:05 +01:00
(nearOfBottom)="onNearOfBottom()"
2018-01-03 10:12:36 +01:00
>
<div #commentHighlightBlock id="highlighted-comment">
2018-02-19 10:38:24 +01:00
<my-video-comment
*ngIf="highlightedThread"
2018-06-04 16:21:17 +02:00
[comment]="highlightedThread"
[video]="video"
[inReplyToCommentId]="inReplyToCommentId"
[commentTree]="threadComments[highlightedThread.id]"
[highlightedComment]="true"
(wantedToReply)="onWantedToReply($event)"
(wantedToDelete)="onWantedToDelete($event)"
(threadCreated)="onThreadCreated($event)"
(resetReply)="onResetReply()"
2018-02-19 10:38:24 +01:00
></my-video-comment>
</div>
2018-01-03 10:12:36 +01:00
<div *ngFor="let comment of comments">
<my-video-comment
2018-02-21 17:46:04 +01:00
*ngIf="!highlightedThread || comment.id !== highlightedThread.id"
2018-01-03 10:12:36 +01:00
[comment]="comment"
[video]="video"
[inReplyToCommentId]="inReplyToCommentId"
[commentTree]="threadComments[comment.id]"
(wantedToReply)="onWantedToReply($event)"
2018-01-04 11:19:16 +01:00
(wantedToDelete)="onWantedToDelete($event)"
(threadCreated)="onThreadCreated($event)"
2018-01-03 10:12:36 +01:00
(resetReply)="onResetReply()"
></my-video-comment>
2017-12-27 16:11:53 +01:00
2018-02-19 10:38:24 +01:00
<div *ngIf="comment.totalReplies !== 0 && !threadComments[comment.id]" (click)="viewReplies(comment.id)" class="view-replies">
2018-06-04 16:21:17 +02:00
<ng-container i18n>View all {{ comment.totalReplies }} replies</ng-container>
2018-01-03 10:12:36 +01:00
<span *ngIf="!threadLoading[comment.id]" class="glyphicon glyphicon-menu-down"></span>
<my-loader class="comment-thread-loading" [loading]="threadLoading[comment.id]"></my-loader>
</div>
2017-12-27 16:11:53 +01:00
</div>
</div>
2018-01-03 10:12:36 +01:00
</ng-template>
2018-06-04 16:21:17 +02:00
<div *ngIf="video.commentsEnabled === false" i18n>
2018-01-03 10:12:36 +01:00
Comments are disabled.
2017-12-27 16:11:53 +01:00
</div>
</div>