2 <div class=
"title-block">
3 <h2 class=
"title-page title-page-single">
4 <ng-container *
ngIf=
"componentPagination.totalItems > 0; then hasComments; else noComments"></ng-container>
5 <ng-template #hasComments
>
6 <ng-container i18n *
ngIf=
"componentPagination.totalItems === 1; else manyComments">1 Comment
</ng-container>
7 <ng-template i18n #manyComments
>{{ componentPagination.totalItems }} Comments
</ng-template>
9 <ng-template i18n #noComments
>Comments
</ng-template>
12 <my-feed [syndicationItems]=
"syndicationItems"></my-feed>
14 <div ngbDropdown
class=
"d-inline-block ml-4">
15 <button class=
"btn btn-sm btn-outline-secondary" id=
"dropdown-sort-comments" ngbDropdownToggle i18n
>
18 <div ngbDropdownMenu
aria-labelledby=
"dropdown-sort-comments">
19 <button (click)=
"handleSortChange('-createdAt')" ngbDropdownItem i18n
>Most recent first (default)
</button>
20 <button (click)=
"handleSortChange('-totalReplies')" ngbDropdownItem i18n
>Most replies first
</button>
25 <ng-template [ngIf]=
"video.commentsEnabled === true">
29 (commentCreated)=
"onCommentThreadCreated($event)"
30 [textValue]=
"commentThreadRedraftValue"
31 ></my-video-comment-add>
33 <div *
ngIf=
"componentPagination.totalItems === 0 && comments.length === 0" i18n
>No comments.
</div>
36 class=
"comment-threads"
39 (nearOfBottom)=
"onNearOfBottom()"
40 [dataObservable]=
"onDataSubject.asObservable()"
43 <div class=
"anchor" #commentHighlightBlock
id=
"highlighted-comment"></div>
45 *
ngIf=
"highlightedThread"
46 [comment]=
"highlightedThread"
48 [inReplyToCommentId]=
"inReplyToCommentId"
49 [commentTree]=
"threadComments[highlightedThread.id]"
50 [highlightedComment]=
"true"
51 [firstInThread]=
"true"
52 (wantedToReply)=
"onWantedToReply($event)"
53 (wantedToDelete)=
"onWantedToDelete($event)"
54 (wantedToRedraft)=
"onWantedToRedraft($event)"
55 (threadCreated)=
"onThreadCreated($event)"
56 (resetReply)=
"onResetReply()"
57 (timestampClicked)=
"handleTimestampClicked($event)"
58 [redraftValue]=
"commentReplyRedraftValue"
62 <div *
ngFor=
"let comment of comments; index as i">
64 *
ngIf=
"!highlightedThread || comment.id !== highlightedThread.id"
67 [inReplyToCommentId]=
"inReplyToCommentId"
68 [commentTree]=
"threadComments[comment.id]"
69 [firstInThread]=
"i + 1 !== comments.length"
70 (wantedToReply)=
"onWantedToReply($event)"
71 (wantedToDelete)=
"onWantedToDelete($event)"
72 (wantedToRedraft)=
"onWantedToRedraft($event)"
73 (threadCreated)=
"onThreadCreated($event)"
74 (resetReply)=
"onResetReply()"
75 (timestampClicked)=
"handleTimestampClicked($event)"
76 [redraftValue]=
"commentReplyRedraftValue"
78 <div *
ngIf=
"comment.totalReplies !== 0 && !threadComments[comment.id]" (click)=
"viewReplies(comment.id)" class=
"view-replies mb-2">
79 <span class=
"glyphicon glyphicon-menu-down"></span>
81 <ng-container *
ngIf=
"comment.totalRepliesFromVideoAuthor > 0; then hasAuthorComments; else noAuthorComments"></ng-container>
82 <ng-template #hasAuthorComments
>
83 <ng-container *
ngIf=
"comment.totalReplies !== comment.totalRepliesFromVideoAuthor; else onlyAuthorComments" i18n
>
84 View {{ comment.totalReplies }} replies from {{ video?.account?.displayName || 'the author' }} and others
86 <ng-template i18n #onlyAuthorComments
>
87 View {{ comment.totalReplies }} replies from {{ video?.account?.displayName || 'the author' }}
90 <ng-template i18n #noAuthorComments
>View {{ comment.totalReplies }} replies
</ng-template>
92 <my-small-loader class=
"comment-thread-loading ml-1" [loading]=
"threadLoading[comment.id]"></my-small-loader>
100 <div *
ngIf=
"video.commentsEnabled === false" i18n
>
101 Comments are disabled.