return (
<div
className={`comment ${
- node.comment.parent_id && !this.props.noIndent ? 'ml-2' : ''
+ node.comment.parent_id && !this.props.noIndent ? 'ml-1' : ''
}`}
>
- {!node.comment.parent_id && !this.props.noIndent && (
- <>
- <hr class="d-sm-none my-2" />
- <div class="d-none d-sm-block d-sm-none my-3" />
- </>
- )}
<div
id={`comment-${node.comment.id}`}
- className={`details comment-node mb-1 ${
+ className={`details comment-node border-top border-light ${
this.isCommentNew ? 'mark' : ''
}`}
style={
'ml-2'}`}
>
<ul class="list-inline mb-1 text-muted small">
- <li className="list-inline-item">
+ <li className="mt-1 list-inline-item">
<Link
className="text-body font-weight-bold"
to={`/u/${node.comment.creator_name}`}
{i18n.t('banned')}
</li>
)}
+ <li className="list-inline-item">
+ <div
+ className="unselectable pointer text-monospace"
+ onClick={linkEvent(this, this.handleCommentCollapse)}
+ >
+ {this.state.collapsed ? (
+ <svg class="icon icon-inline">
+ <use xlinkHref="#icon-plus-square"></use>
+ </svg>
+ ) : (
+ <svg class="icon icon-inline">
+ <use xlinkHref="#icon-minus-square"></use>
+ </svg>
+ )}
+ </div>
+ </li>
{this.props.showCommunity && (
<li className="list-inline-item">
<span> {i18n.t('to')} </span>
<MomentTime data={node.comment} />
</span>
</li>
- <li className="list-inline-item">
- <div
- className="unselectable pointer text-monospace"
- onClick={linkEvent(this, this.handleCommentCollapse)}
- >
- {this.state.collapsed ? (
- <svg class="icon icon-inline">
- <use xlinkHref="#icon-plus-square"></use>
- </svg>
- ) : (
- <svg class="icon icon-inline">
- <use xlinkHref="#icon-minus-square"></use>
- </svg>
- )}
- </div>
- </li>
</ul>
{this.state.showEdit && (
<CommentForm
)}
/>
)}
- <ul class="list-inline mb-0 text-muted font-weight-bold h5">
+ <ul class="list-inline mb-0 text-muted font-weight-bold small">
{this.props.markable && (
- <li className="list-inline-item-action">
- <span
- class="pointer"
+ <li className="list-inline-item">
+ <button
+ class="btn btn-link btn-sm btn-animate text-muted"
onClick={linkEvent(this, this.handleMarkRead)}
data-tippy-content={
node.comment.read
>
<use xlinkHref="#icon-check"></use>
</svg>
- </span>
+ </button>
</li>
)}
{UserService.Instance.user && !this.props.viewOnly && (
<>
- <li className="list-inline-item-action">
+ <li className="list-inline-item">
<button
- className={`vote-animate btn btn-link p-0 mb-1 ${
+ className={`btn btn-link btn-sm btn-animate ${
this.state.my_vote == 1 ? 'text-info' : 'text-muted'
}`}
onClick={linkEvent(node, this.handleCommentUpvote)}
</button>
</li>
{WebSocketService.Instance.site.enable_downvotes && (
- <li className="list-inline-item-action">
+ <li className="list-inline-item">
<button
- className={`vote-animate btn btn-link p-0 mb-1 ${
+ className={`btn btn-link btn-sm btn-animate ${
this.state.my_vote == -1
? 'text-danger'
: 'text-muted'
</button>
</li>
)}
- <li className="list-inline-item-action">
- <span
- class="pointer"
+ <li className="list-inline-item">
+ <button
+ class="btn btn-link btn-sm btn-animate text-muted"
onClick={linkEvent(this, this.handleReplyClick)}
data-tippy-content={i18n.t('reply')}
>
<svg class="icon icon-inline">
<use xlinkHref="#icon-reply1"></use>
</svg>
- </span>
+ </button>
</li>
- <li className="list-inline-item-action">
+ <li className="list-inline-item">
<Link
- className="text-muted"
+ className="btn btn-link btn-sm btn-animate text-muted"
to={`/post/${node.comment.post_id}/comment/${node.comment.id}`}
title={i18n.t('link')}
>
</Link>
</li>
{!this.state.showAdvanced ? (
- <li className="list-inline-item-action">
- <span
- className="unselectable pointer"
+ <li className="list-inline-item">
+ <button
+ className="btn btn-link btn-sm btn-animate text-muted"
onClick={linkEvent(this, this.handleShowAdvanced)}
data-tippy-content={i18n.t('more')}
>
<svg class="icon icon-inline">
<use xlinkHref="#icon-more-vertical"></use>
</svg>
- </span>
+ </button>
</li>
) : (
<>
{!this.myComment && (
- <li className="list-inline-item-action">
+ <li className="list-inline-item">
<Link
- class="text-muted"
+ class="btn btn-link btn-sm btn-animate text-muted"
to={`/create_private_message?recipient_id=${node.comment.creator_id}`}
title={i18n.t('message').toLowerCase()}
>
</Link>
</li>
)}
- <li className="list-inline-item-action">
- <span
- class="pointer"
+ <li className="list-inline-item">
+ <button
+ class="btn btn-link btn-sm btn-animate text-muted"
onClick={linkEvent(
this,
this.handleSaveCommentClick
>
<use xlinkHref="#icon-star"></use>
</svg>
- </span>
+ </button>
</li>
- <li className="list-inline-item-action">
- <span
- className="pointer"
+ <li className="list-inline-item">
+ <button
+ className="btn btn-link btn-sm btn-animate text-muted"
onClick={linkEvent(this, this.handleViewSource)}
data-tippy-content={i18n.t('view_source')}
>
>
<use xlinkHref="#icon-file-text"></use>
</svg>
- </span>
+ </button>
</li>
{this.myComment && (
<>
- <li className="list-inline-item-action">•</li>
- <li className="list-inline-item-action">
- <span
- class="pointer"
+ <li className="list-inline-item">•</li>
+ <li className="list-inline-item">
+ <button
+ class="btn btn-link btn-sm btn-animate text-muted"
onClick={linkEvent(
this,
this.handleEditClick
<svg class="icon icon-inline">
<use xlinkHref="#icon-edit"></use>
</svg>
- </span>
+ </button>
</li>
- <li className="list-inline-item-action">
- <span
- class="pointer"
+ <li className="list-inline-item">
+ <button
+ class="btn btn-link btn-sm btn-animate text-muted"
onClick={linkEvent(
this,
this.handleDeleteClick
>
<use xlinkHref="#icon-trash"></use>
</svg>
- </span>
+ </button>
</li>
</>
)}
{/* Admins and mods can remove comments */}
{(this.canMod || this.canAdmin) && (
<>
- <li className="list-inline-item-action">
+ <li className="list-inline-item">
{!node.comment.removed ? (
<span
class="pointer"
{this.canMod && (
<>
{!this.isMod && (
- <li className="list-inline-item-action">
+ <li className="list-inline-item">
{!node.comment.banned_from_community ? (
<span
class="pointer"
</li>
)}
{!node.comment.banned_from_community && (
- <li className="list-inline-item-action">
+ <li className="list-inline-item">
{!this.state.showConfirmAppointAsMod ? (
<span
class="pointer"
{/* Community creators and admins can transfer community to another mod */}
{(this.amCommunityCreator || this.canAdmin) &&
this.isMod && (
- <li className="list-inline-item-action">
+ <li className="list-inline-item">
{!this.state.showConfirmTransferCommunity ? (
<span
class="pointer"
{this.canAdmin && (
<>
{!this.isAdmin && (
- <li className="list-inline-item-action">
+ <li className="list-inline-item">
{!node.comment.banned ? (
<span
class="pointer"
</li>
)}
{!node.comment.banned && (
- <li className="list-inline-item-action">
+ <li className="list-inline-item">
{!this.state.showConfirmAppointAsAdmin ? (
<span
class="pointer"
)}
{/* Site Creator can transfer to another admin */}
{this.amSiteCreator && this.isAdmin && (
- <li className="list-inline-item-action">
+ <li className="list-inline-item">
{!this.state.showConfirmTransferSite ? (
<span
class="pointer"
<div class="row">
<div className={`vote-bar col-1 pr-0 small text-center`}>
<button
- className={`vote-animate btn btn-link p-0 ${
+ className={`btn-animate btn btn-link p-0 ${
this.state.my_vote == 1 ? 'text-info' : 'text-muted'
}`}
onClick={linkEvent(this, this.handlePostLike)}
</div>
{WebSocketService.Instance.site.enable_downvotes && (
<button
- className={`vote-animate btn btn-link p-0 ${
+ className={`btn-animate btn btn-link p-0 ${
this.state.my_vote == -1 ? 'text-danger' : 'text-muted'
}`}
onClick={linkEvent(this, this.handlePostDisLike)}
</Link>
</li>
</ul>
- <ul class="list-inline mb-1 small text-muted">
- {this.props.post.duplicates && (
+ {this.props.post.duplicates && (
+ <ul class="list-inline mb-1 small text-muted">
<>
<li className="list-inline-item mr-2">
{i18n.t('cross_posted_to')}
</li>
))}
</>
- )}
- </ul>
- <ul class="list-inline mb-1 text-muted h5 font-weight-bold">
+ </ul>
+ )}
+ <ul class="list-inline mb-1 text-muted font-weight-bold">
{UserService.Instance.user && (
<>
{this.props.showBody && (
<>
- <li className="list-inline-item-action">
- <span
- class="pointer"
+ <li className="list-inline-item">
+ <button
+ class="btn btn-link btn-animate btn-sm text-muted"
onClick={linkEvent(this, this.handleSavePostClick)}
data-tippy-content={
post.saved ? i18n.t('unsave') : i18n.t('save')
>
<use xlinkHref="#icon-star"></use>
</svg>
- </span>
+ </button>
</li>
- <li className="list-inline-item-action">
+ <li className="list-inline-item">
<Link
- className="text-muted"
+ class="btn btn-link btn-animate btn-sm text-muted"
to={`/create_post${this.crossPostParams}`}
title={i18n.t('cross_post')}
>
)}
{this.myPost && this.props.showBody && (
<>
- <li className="list-inline-item-action">
- <span
- class="pointer"
+ <li className="list-inline-item">
+ <button
+ class="btn btn-link btn-animate btn-sm text-muted"
onClick={linkEvent(this, this.handleEditClick)}
data-tippy-content={i18n.t('edit')}
>
<svg class="icon icon-inline">
<use xlinkHref="#icon-edit"></use>
</svg>
- </span>
+ </button>
</li>
- <li className="list-inline-item-action">
- <span
- class="pointer"
+ <li className="list-inline-item">
+ <button
+ class="btn btn-link btn-animate btn-sm text-muted"
onClick={linkEvent(this, this.handleDeleteClick)}
data-tippy-content={
!post.deleted
>
<use xlinkHref="#icon-trash"></use>
</svg>
- </span>
+ </button>
</li>
</>
)}
{!this.state.showAdvanced && this.props.showBody ? (
- <li className="list-inline-item-action">
- <span
- className="pointer"
+ <li className="list-inline-item">
+ <button
+ class="btn btn-link btn-animate btn-sm text-muted"
onClick={linkEvent(this, this.handleShowAdvanced)}
data-tippy-content={i18n.t('more')}
>
<svg class="icon icon-inline">
<use xlinkHref="#icon-more-vertical"></use>
</svg>
- </span>
+ </button>
</li>
) : (
<>
{this.props.showBody && post.body && (
- <li className="list-inline-item-action">
- <span
- className="pointer"
+ <li className="list-inline-item">
+ <button
+ class="btn btn-link btn-animate btn-sm text-muted"
onClick={linkEvent(this, this.handleViewSource)}
data-tippy-content={i18n.t('view_source')}
>
>
<use xlinkHref="#icon-file-text"></use>
</svg>
- </span>
+ </button>
</li>
)}
{this.canModOnSelf && (
<>
- <li className="list-inline-item-action">
- <span
- class="pointer"
+ <li className="list-inline-item">
+ <button
+ class="btn btn-link btn-animate btn-sm text-muted"
onClick={linkEvent(this, this.handleModLock)}
data-tippy-content={
post.locked
>
<use xlinkHref="#icon-lock"></use>
</svg>
- </span>
+ </button>
</li>
- <li className="list-inline-item-action">
- <span
- class="pointer"
+ <li className="list-inline-item">
+ <button
+ class="btn btn-link btn-animate btn-sm text-muted"
onClick={linkEvent(this, this.handleModSticky)}
data-tippy-content={
post.stickied
>
<use xlinkHref="#icon-pin"></use>
</svg>
- </span>
+ </button>
</li>
</>
)}