Removing button wrapper for comment context. Fixes #702

This commit is contained in:
Dessalines 2020-05-08 13:36:52 -04:00
parent 88e1251d6b
commit 9bc45def17

View file

@ -142,9 +142,11 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
} }
> >
<div <div
class={`${!this.props.noIndent && class={`${
!this.props.noIndent &&
this.props.node.comment.parent_id && this.props.node.comment.parent_id &&
'ml-2'}`} 'ml-2'
}`}
> >
<div class="d-flex flex-wrap align-items-center mb-1 mt-1 text-muted small"> <div class="d-flex flex-wrap align-items-center mb-1 mt-1 text-muted small">
<span class="mr-2"> <span class="mr-2">
@ -249,8 +251,9 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
this.loadingIcon this.loadingIcon
) : ( ) : (
<svg <svg
class={`icon icon-inline ${node.comment.read && class={`icon icon-inline ${
'text-success'}`} node.comment.read && 'text-success'
}`}
> >
<use xlinkHref="#icon-check"></use> <use xlinkHref="#icon-check"></use>
</svg> </svg>
@ -302,8 +305,9 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
this.loadingIcon this.loadingIcon
) : ( ) : (
<svg <svg
class={`icon icon-inline ${node.comment.saved && class={`icon icon-inline ${
'text-warning'}`} node.comment.saved && 'text-warning'
}`}
> >
<use xlinkHref="#icon-star"></use> <use xlinkHref="#icon-star"></use>
</svg> </svg>
@ -350,8 +354,9 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
data-tippy-content={i18n.t('view_source')} data-tippy-content={i18n.t('view_source')}
> >
<svg <svg
class={`icon icon-inline ${this.state class={`icon icon-inline ${
.viewSource && 'text-success'}`} this.state.viewSource && 'text-success'
}`}
> >
<use xlinkHref="#icon-file-text"></use> <use xlinkHref="#icon-file-text"></use>
</svg> </svg>
@ -380,8 +385,9 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
} }
> >
<svg <svg
class={`icon icon-inline ${node.comment class={`icon icon-inline ${
.deleted && 'text-danger'}`} node.comment.deleted && 'text-danger'
}`}
> >
<use xlinkHref="#icon-trash"></use> <use xlinkHref="#icon-trash"></use>
</svg> </svg>
@ -700,19 +706,15 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
get linkBtn() { get linkBtn() {
let node = this.props.node; let node = this.props.node;
return ( return (
<button className="btn btn-link btn-animate"> <Link
<Link class="btn btn-link btn-animate text-muted"
class="text-muted" to={`/post/${node.comment.post_id}/comment/${node.comment.id}`}
to={`/post/${node.comment.post_id}/comment/${node.comment.id}`} title={this.props.showContext ? i18n.t('show_context') : i18n.t('link')}
title={ >
this.props.showContext ? i18n.t('show_context') : i18n.t('link') <svg class="icon icon-inline">
} <use xlinkHref="#icon-link"></use>
> </svg>
<svg class="icon icon-inline"> </Link>
<use xlinkHref="#icon-link"></use>
</svg>
</Link>
</button>
); );
} }