moderators?: CommunityModeratorView[];
admins?: PersonView[];
noBorder?: boolean;
- noIndent?: boolean;
+ isTopLevel?: boolean;
viewOnly?: boolean;
locked?: boolean;
markable?: boolean;
mark: this.isCommentNew || this.commentView.comment.distinguished,
})}
>
- <div
- className={classNames({
- "ms-2": !this.props.noIndent,
- })}
- >
+ <div className="ms-2">
<div className="d-flex flex-wrap align-items-center text-muted small">
<button
className="btn btn-sm btn-link text-muted me-2"
allLanguages={this.props.allLanguages}
siteLanguages={this.props.siteLanguages}
hideImages={this.props.hideImages}
- isChild={!this.props.noIndent}
+ isChild={!this.props.isTopLevel}
depth={this.props.node.depth + 1}
finished={this.props.finished}
onCommentReplyRead={this.props.onCommentReplyRead}
admins?: PersonView[];
maxCommentsShown?: number;
noBorder?: boolean;
- noIndent?: boolean;
+ isTopLevel?: boolean;
viewOnly?: boolean;
locked?: boolean;
markable?: boolean;
this.props.nodes.length > 0 && (
<ul
className={classNames("comments", {
- "ms-1": !!this.props.isChild,
+ "ms-1": this.props.depth && this.props.depth > 1,
"border-top border-light": !this.props.noBorder,
})}
style={
key={node.comment_view.comment.id}
node={node}
noBorder={this.props.noBorder}
- noIndent={this.props.noIndent}
+ isTopLevel={this.props.isTopLevel}
viewOnly={this.props.viewOnly}
locked={this.props.locked}
moderators={this.props.moderators}
nodes={commentsToFlatNodes(this.state.commentsRes.data.comments)}
viewType={CommentViewType.Flat}
finished={this.state.finished}
- noIndent
+ isTopLevel
showContext
enableDownvotes={enableDownvotes(site_res)}
moderators={communityRes.moderators}
nodes={commentsToFlatNodes(comments)}
viewType={CommentViewType.Flat}
finished={this.state.finished}
- noIndent
+ isTopLevel
showCommunity
showContext
enableDownvotes={enableDownvotes(siteRes)}
viewType={CommentViewType.Flat}
admins={this.props.admins}
finished={this.props.finished}
- noIndent
+ isTopLevel
showCommunity
showContext
enableDownvotes={this.props.enableDownvotes}
nodes={commentsToFlatNodes(commentsRes.data.comments)}
viewType={this.state.commentViewType}
maxCommentsShown={this.state.maxCommentsShown}
- noIndent
+ isTopLevel
locked={postRes.data.post_view.post.locked}
moderators={postRes.data.moderators}
admins={this.state.siteRes.admins}
viewType={CommentViewType.Flat}
viewOnly
locked
- noIndent
+ isTopLevel
enableDownvotes={enableDownvotes(this.state.siteRes)}
allLanguages={this.state.siteRes.all_languages}
siteLanguages={this.state.siteRes.discussion_languages}
viewType={CommentViewType.Flat}
viewOnly
locked
- noIndent
+ isTopLevel
enableDownvotes={enableDownvotes(siteRes)}
allLanguages={siteRes.all_languages}
siteLanguages={siteRes.discussion_languages}