]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/+video-watch/comment/video-comments.component.html
fix deleted comment layout and its notification display
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / comment / video-comments.component.html
CommitLineData
4635f59d 1<div>
169310b2 2 <div class="title-block">
44efbeba
RK
3 <div class="title-page title-page-single">
4 <ng-container *ngIf="comments.length > 0; then hasComments; else noComments"></ng-container>
5 <ng-template #hasComments>
6 <ng-container i18n *ngIf="comments.length === 1; else manyComments">1 Comment</ng-container>
7 <ng-template i18n #manyComments>{{ comments.length }} Comments</ng-template>
8 </ng-template>
9 <ng-template i18n #noComments>Comments</ng-template>
169310b2 10 </div>
53877968 11
c199c427 12 <my-feed [syndicationItems]="syndicationItems"></my-feed>
4635f59d
C
13 </div>
14
47564bbe
C
15 <ng-template [ngIf]="video.commentsEnabled === true">
16 <my-video-comment-add
47564bbe 17 [video]="video"
cf117aaa 18 [user]="user"
47564bbe
C
19 (commentCreated)="onCommentThreadCreated($event)"
20 ></my-video-comment-add>
4635f59d 21
b1d40cff 22 <div *ngIf="componentPagination.totalItems === 0 && comments.length === 0" i18n>No comments.</div>
4635f59d 23
47564bbe
C
24 <div
25 class="comment-threads"
0cd4344f 26 myInfiniteScroller
aa55a4da 27 [autoInit]="true"
0cd4344f 28 (nearOfBottom)="onNearOfBottom()"
ad453580 29 [dataObservable]="onDataSubject.asObservable()"
47564bbe 30 >
bf079b7b 31 <div #commentHighlightBlock id="highlighted-comment">
1263fc4e 32 <my-video-comment
bf079b7b 33 *ngIf="highlightedThread"
b1d40cff
C
34 [comment]="highlightedThread"
35 [video]="video"
36 [inReplyToCommentId]="inReplyToCommentId"
37 [commentTree]="threadComments[highlightedThread.id]"
38 [highlightedComment]="true"
39 (wantedToReply)="onWantedToReply($event)"
40 (wantedToDelete)="onWantedToDelete($event)"
41 (threadCreated)="onThreadCreated($event)"
42 (resetReply)="onResetReply()"
b29bf61d 43 (timestampClicked)="handleTimestampClicked($event)"
1263fc4e
C
44 ></my-video-comment>
45 </div>
46
47564bbe
C
47 <div *ngFor="let comment of comments">
48 <my-video-comment
5b8072ee 49 *ngIf="!highlightedThread || comment.id !== highlightedThread.id"
47564bbe
C
50 [comment]="comment"
51 [video]="video"
52 [inReplyToCommentId]="inReplyToCommentId"
53 [commentTree]="threadComments[comment.id]"
54 (wantedToReply)="onWantedToReply($event)"
4cb6d457
C
55 (wantedToDelete)="onWantedToDelete($event)"
56 (threadCreated)="onThreadCreated($event)"
47564bbe 57 (resetReply)="onResetReply()"
b29bf61d 58 (timestampClicked)="handleTimestampClicked($event)"
47564bbe 59 ></my-video-comment>
4635f59d 60
1263fc4e 61 <div *ngIf="comment.totalReplies !== 0 && !threadComments[comment.id]" (click)="viewReplies(comment.id)" class="view-replies">
b1d40cff 62 <ng-container i18n>View all {{ comment.totalReplies }} replies</ng-container>
47564bbe
C
63
64 <span *ngIf="!threadLoading[comment.id]" class="glyphicon glyphicon-menu-down"></span>
b28e4e5e 65 <my-small-loader class="comment-thread-loading" [loading]="threadLoading[comment.id]"></my-small-loader>
47564bbe 66 </div>
4635f59d
C
67 </div>
68 </div>
47564bbe
C
69 </ng-template>
70
b1d40cff 71 <div *ngIf="video.commentsEnabled === false" i18n>
47564bbe 72 Comments are disabled.
4635f59d
C
73 </div>
74</div>