mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 12:21:13 +00:00
feat: Hide 'comments' in post listing comments button; icon and title text is clear
This commit is contained in:
parent
94bc9092ee
commit
3574212c76
1 changed files with 10 additions and 12 deletions
|
@ -734,24 +734,22 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
|
|
||||||
get commentsButton() {
|
get commentsButton() {
|
||||||
const post_view = this.postView;
|
const post_view = this.postView;
|
||||||
|
const title = i18n.t("number_of_comments", {
|
||||||
|
count: Number(post_view.counts.comments),
|
||||||
|
formattedCount: Number(post_view.counts.comments),
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
className="btn btn-link text-muted ps-0 text-muted"
|
className="btn btn-link btn-sm text-muted ps-0"
|
||||||
title={i18n.t("number_of_comments", {
|
title={title}
|
||||||
count: Number(post_view.counts.comments),
|
|
||||||
formattedCount: Number(post_view.counts.comments),
|
|
||||||
})}
|
|
||||||
to={`/post/${post_view.post.id}?scrollToComments=true`}
|
to={`/post/${post_view.post.id}?scrollToComments=true`}
|
||||||
|
data-tippy-content={title}
|
||||||
>
|
>
|
||||||
<Icon icon="message-square" classes="me-1" inline />
|
<Icon icon="message-square" classes="me-1" inline />
|
||||||
<span className="me-2">
|
{post_view.counts.comments}
|
||||||
{i18n.t("number_of_comments", {
|
|
||||||
count: Number(post_view.counts.comments),
|
|
||||||
formattedCount: numToSI(post_view.counts.comments),
|
|
||||||
})}
|
|
||||||
</span>
|
|
||||||
{this.unreadCount && (
|
{this.unreadCount && (
|
||||||
<span className="small text-warning">
|
<span className="badge text-bg-warning">
|
||||||
({this.unreadCount} {i18n.t("new")})
|
({this.unreadCount} {i18n.t("new")})
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in a new issue