Better spacing beetween comments
This commit is contained in:
parent
5b0413ddaa
commit
c62a34d36b
|
@ -11,7 +11,7 @@
|
||||||
<div class="vertical-border"></div>
|
<div class="vertical-border"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="right">
|
<div class="right" [ngClass]="{ 'mb-3': firstInThread }">
|
||||||
<span *ngIf="comment.isDeleted" class="comment-avatar"></span>
|
<span *ngIf="comment.isDeleted" class="comment-avatar"></span>
|
||||||
|
|
||||||
<div class="comment">
|
<div class="comment">
|
||||||
|
@ -81,5 +81,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<ng-content></ng-content>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -22,6 +22,7 @@ export class VideoCommentComponent implements OnInit, OnChanges {
|
||||||
@Input() commentTree: VideoCommentThreadTree
|
@Input() commentTree: VideoCommentThreadTree
|
||||||
@Input() inReplyToCommentId: number
|
@Input() inReplyToCommentId: number
|
||||||
@Input() highlightedComment = false
|
@Input() highlightedComment = false
|
||||||
|
@Input() firstInThread = false
|
||||||
|
|
||||||
@Output() wantedToDelete = new EventEmitter<VideoComment>()
|
@Output() wantedToDelete = new EventEmitter<VideoComment>()
|
||||||
@Output() wantedToReply = new EventEmitter<VideoComment>()
|
@Output() wantedToReply = new EventEmitter<VideoComment>()
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
[inReplyToCommentId]="inReplyToCommentId"
|
[inReplyToCommentId]="inReplyToCommentId"
|
||||||
[commentTree]="threadComments[highlightedThread.id]"
|
[commentTree]="threadComments[highlightedThread.id]"
|
||||||
[highlightedComment]="true"
|
[highlightedComment]="true"
|
||||||
|
[firstInThread]="true"
|
||||||
(wantedToReply)="onWantedToReply($event)"
|
(wantedToReply)="onWantedToReply($event)"
|
||||||
(wantedToDelete)="onWantedToDelete($event)"
|
(wantedToDelete)="onWantedToDelete($event)"
|
||||||
(threadCreated)="onThreadCreated($event)"
|
(threadCreated)="onThreadCreated($event)"
|
||||||
|
@ -54,36 +55,38 @@
|
||||||
></my-video-comment>
|
></my-video-comment>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngFor="let comment of comments">
|
<div *ngFor="let comment of comments; index as i">
|
||||||
<my-video-comment
|
<my-video-comment
|
||||||
*ngIf="!highlightedThread || comment.id !== highlightedThread.id"
|
*ngIf="!highlightedThread || comment.id !== highlightedThread.id"
|
||||||
[comment]="comment"
|
[comment]="comment"
|
||||||
[video]="video"
|
[video]="video"
|
||||||
[inReplyToCommentId]="inReplyToCommentId"
|
[inReplyToCommentId]="inReplyToCommentId"
|
||||||
[commentTree]="threadComments[comment.id]"
|
[commentTree]="threadComments[comment.id]"
|
||||||
|
[firstInThread]="i + 1 !== comments.length"
|
||||||
(wantedToReply)="onWantedToReply($event)"
|
(wantedToReply)="onWantedToReply($event)"
|
||||||
(wantedToDelete)="onWantedToDelete($event)"
|
(wantedToDelete)="onWantedToDelete($event)"
|
||||||
(threadCreated)="onThreadCreated($event)"
|
(threadCreated)="onThreadCreated($event)"
|
||||||
(resetReply)="onResetReply()"
|
(resetReply)="onResetReply()"
|
||||||
(timestampClicked)="handleTimestampClicked($event)"
|
(timestampClicked)="handleTimestampClicked($event)"
|
||||||
></my-video-comment>
|
>
|
||||||
|
<div *ngIf="comment.totalReplies !== 0 && !threadComments[comment.id]" (click)="viewReplies(comment.id)" class="view-replies mb-2">
|
||||||
<div *ngIf="comment.totalReplies !== 0 && !threadComments[comment.id]" (click)="viewReplies(comment.id)" class="view-replies">
|
<span class="glyphicon glyphicon-menu-down"></span>
|
||||||
<span *ngIf="!threadLoading[comment.id]" class="glyphicon glyphicon-menu-down"></span>
|
|
||||||
|
<ng-container *ngIf="comment.totalRepliesFromVideoAuthor > 0; then hasAuthorComments; else noAuthorComments"></ng-container>
|
||||||
<ng-container *ngIf="comment.totalRepliesFromVideoAuthor > 0; then hasAuthorComments; else noAuthorComments"></ng-container>
|
<ng-template #hasAuthorComments>
|
||||||
<ng-template #hasAuthorComments>
|
<ng-container *ngIf="comment.totalReplies !== comment.totalRepliesFromVideoAuthor; else onlyAuthorComments" i18n>
|
||||||
<ng-container *ngIf="comment.totalReplies !== comment.totalRepliesFromVideoAuthor; else onlyAuthorComments" i18n>
|
View {{ comment.totalReplies }} replies from {{ video?.account?.displayName || 'the author' }} and others
|
||||||
View {{ comment.totalReplies }} replies from {{ video?.account?.displayName || 'the author' }} and others
|
</ng-container>
|
||||||
</ng-container>
|
<ng-template i18n #onlyAuthorComments>
|
||||||
<ng-template i18n #onlyAuthorComments>
|
View {{ comment.totalReplies }} replies from {{ video?.account?.displayName || 'the author' }}
|
||||||
View {{ comment.totalReplies }} replies from {{ video?.account?.displayName || 'the author' }}
|
</ng-template>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ng-template>
|
<ng-template i18n #noAuthorComments>View {{ comment.totalReplies }} replies</ng-template>
|
||||||
<ng-template i18n #noAuthorComments>View {{ comment.totalReplies }} replies</ng-template>
|
|
||||||
|
<my-small-loader class="comment-thread-loading ml-1" [loading]="threadLoading[comment.id]"></my-small-loader>
|
||||||
|
</div>
|
||||||
|
</my-video-comment>
|
||||||
|
|
||||||
<my-small-loader class="comment-thread-loading" [loading]="threadLoading[comment.id]"></my-small-loader>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
font-weight: $font-semibold;
|
font-weight: $font-semibold;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-left: 46px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.glyphicon, .comment-thread-loading {
|
.glyphicon, .comment-thread-loading {
|
||||||
|
|
Loading…
Reference in New Issue