@Component({
selector: 'my-video-comment',
templateUrl: './video-comment.component.html',
- styleUrls: ['./video-comment.component.scss']
+ styleUrls: [ './video-comment.component.scss' ]
})
export class VideoCommentComponent implements OnInit, OnChanges {
@ViewChild('commentReportModal') commentReportModal: CommentReportComponent
const user = this.authService.getUser()
if (user.hasRight(UserRight.MANAGE_USERS)) {
this.userService.getUserWithCache(account.userId)
- .subscribe(
- user => this.commentUser = user,
+ .subscribe({
+ next: user => this.commentUser = user,
- err => this.notifier.error(err.message)
- )
+ error: err => this.notifier.error(err.message)
+ })
}
}
})
}
- if (this.prependModerationActions.length === 0) {
- this.prependModerationActions = undefined
+ if (this.prependModerationActions.length !== 0) {
+ this.prependModerationActions.unshift({
+ label: $localize`Actions on comment`,
+ isHeader: true
+ })
}
}