mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-16 09:24:00 +00:00
Removing button wrapper for comment context. Fixes #702
This commit is contained in:
parent
88e1251d6b
commit
9bc45def17
1 changed files with 25 additions and 23 deletions
34
ui/src/components/comment-node.tsx
vendored
34
ui/src/components/comment-node.tsx
vendored
|
@ -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="text-muted"
|
class="btn btn-link btn-animate text-muted"
|
||||||
to={`/post/${node.comment.post_id}/comment/${node.comment.id}`}
|
to={`/post/${node.comment.post_id}/comment/${node.comment.id}`}
|
||||||
title={
|
title={this.props.showContext ? i18n.t('show_context') : i18n.t('link')}
|
||||||
this.props.showContext ? i18n.t('show_context') : i18n.t('link')
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
<svg class="icon icon-inline">
|
<svg class="icon icon-inline">
|
||||||
<use xlinkHref="#icon-link"></use>
|
<use xlinkHref="#icon-link"></use>
|
||||||
</svg>
|
</svg>
|
||||||
</Link>
|
</Link>
|
||||||
</button>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue