users subcomments
This commit is contained in:
parent
a464042482
commit
86d9f15679
@ -6,7 +6,7 @@
|
||||
<p>{{'user.commentsBy' | i18n}}<a routerLink="/u/{{username}}">{{username}}</a></p>
|
||||
<ng-container *ngFor="let comment of comments.content; let i = index">
|
||||
<mat-divider class="divider" *ngIf="i > 0"></mat-divider>
|
||||
<ui-comment [comment]="comment" [ignore]="ignore"></ui-comment>
|
||||
<ui-comment [comment]="comment" [ignore]="ignore" [parentLink]="true"></ui-comment>
|
||||
</ng-container>
|
||||
|
||||
<mat-list *ngIf="comments.totalElements == 0">
|
||||
|
@ -20,6 +20,8 @@
|
||||
| datef}}</a>
|
||||
<span *ngIf="comment.metadata && comment.metadata.author"> {{'comment.author' | i18n}}<a
|
||||
routerLink="/u/{{comment.author}}">{{comment.author}}</a></span>
|
||||
<span *ngIf="parentLink && comment.parent"> {{'comment.to' | i18n}} <a
|
||||
routerLink="/c/{{comment.parent}}">{{'comment' | i18n}}</a></span>
|
||||
<span *ngIf="comment.metadata && comment.metadata.entry"> {{'comment.on' | i18n}} <a class="entry"
|
||||
routerLink="/e/{{comment.target}}">{{comment.metadata.entry || 'entry'}}</a></span>
|
||||
<span *ngIf="comment.metadata && comment.metadata.unvote"> | </span>
|
||||
|
@ -20,6 +20,7 @@ export class UiComment implements OnInit {
|
||||
@Input() change: Function;
|
||||
@Input() ignore: string[] = [];
|
||||
@Input() subcomments: boolean = false;
|
||||
@Input() parentLink: boolean = false;
|
||||
@ViewChild('subcomments') comments: UiComments;
|
||||
|
||||
constructor(private authService: AuthService, private commentService: CommentService, private voteService: VoteService,
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div *ngIf="comments && comments.content" fxLayout="column" fxFlexFill class="comments">
|
||||
<ng-container *ngFor="let comment of comments.content; let i = index">
|
||||
<mat-divider class="divider" *ngIf="i > 0"></mat-divider>
|
||||
<ui-comment class="comment" [comment]="comment" [change]="boundRefresh" [subcomments]="subcomments" [ignore]="ignore"></ui-comment>
|
||||
<ui-comment class="comment" [comment]="comment" [change]="boundRefresh" [subcomments]="subcomments" [ignore]="ignore" [parentLink]="parentLink"></ui-comment>
|
||||
</ng-container>
|
||||
|
||||
<mat-list *ngIf="comments.totalElements == 0 && !parent">
|
||||
|
@ -15,6 +15,7 @@ export class UiComments implements OnInit {
|
||||
@Input() parent: number;
|
||||
@Input() ignore: string[] = [];
|
||||
@Input() subcomments: boolean = false;
|
||||
@Input() parentLink: boolean = false;
|
||||
boundRefresh: Function;
|
||||
|
||||
constructor(private commentService: CommentService) { }
|
||||
|
Loading…
Reference in New Issue
Block a user