]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - 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
1 <div>
2 <div class="title-block">
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>
10 </div>
11
12 <my-feed [syndicationItems]="syndicationItems"></my-feed>
13 </div>
14
15 <ng-template [ngIf]="video.commentsEnabled === true">
16 <my-video-comment-add
17 [video]="video"
18 [user]="user"
19 (commentCreated)="onCommentThreadCreated($event)"
20 ></my-video-comment-add>
21
22 <div *ngIf="componentPagination.totalItems === 0 && comments.length === 0" i18n>No comments.</div>
23
24 <div
25 class="comment-threads"
26 myInfiniteScroller
27 [autoInit]="true"
28 (nearOfBottom)="onNearOfBottom()"
29 [dataObservable]="onDataSubject.asObservable()"
30 >
31 <div #commentHighlightBlock id="highlighted-comment">
32 <my-video-comment
33 *ngIf="highlightedThread"
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()"
43 (timestampClicked)="handleTimestampClicked($event)"
44 ></my-video-comment>
45 </div>
46
47 <div *ngFor="let comment of comments">
48 <my-video-comment
49 *ngIf="!highlightedThread || comment.id !== highlightedThread.id"
50 [comment]="comment"
51 [video]="video"
52 [inReplyToCommentId]="inReplyToCommentId"
53 [commentTree]="threadComments[comment.id]"
54 (wantedToReply)="onWantedToReply($event)"
55 (wantedToDelete)="onWantedToDelete($event)"
56 (threadCreated)="onThreadCreated($event)"
57 (resetReply)="onResetReply()"
58 (timestampClicked)="handleTimestampClicked($event)"
59 ></my-video-comment>
60
61 <div *ngIf="comment.totalReplies !== 0 && !threadComments[comment.id]" (click)="viewReplies(comment.id)" class="view-replies">
62 <ng-container i18n>View all {{ comment.totalReplies }} replies</ng-container>
63
64 <span *ngIf="!threadLoading[comment.id]" class="glyphicon glyphicon-menu-down"></span>
65 <my-small-loader class="comment-thread-loading" [loading]="threadLoading[comment.id]"></my-small-loader>
66 </div>
67 </div>
68 </div>
69 </ng-template>
70
71 <div *ngIf="video.commentsEnabled === false" i18n>
72 Comments are disabled.
73 </div>
74 </div>