From 90a9f728177f9fac27a38892a26159d7cd391fbe Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Tue, 23 May 2023 22:16:54 +0200 Subject: [PATCH] Changes to language tag - Dont use bright white color because its not that important - Hide tag in case of undetermined (doesnt add any information) --- lemmy-translations | 2 +- src/shared/components/comment/comment-node.tsx | 16 +++++++++------- src/shared/components/post/post-listing.tsx | 16 +++++++++------- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/lemmy-translations b/lemmy-translations index a1fff8b..007e536 160000 --- a/lemmy-translations +++ b/lemmy-translations @@ -1 +1 @@ -Subproject commit a1fff8b481f4b02327e4ee04088606af627628f2 +Subproject commit 007e53683768aeba63e9e4c179c1d240217bcee2 diff --git a/src/shared/components/comment/comment-node.tsx b/src/shared/components/comment/comment-node.tsx index d2dee1e..8347786 100644 --- a/src/shared/components/comment/comment-node.tsx +++ b/src/shared/components/comment/comment-node.tsx @@ -283,13 +283,15 @@ export class CommentNode extends Component { )} {this.linkBtn(true)} - - { - this.props.allLanguages.find( - lang => lang.id === cv.comment.language_id - )?.name - } - + {cv.comment.language_id != 0 && ( + + { + this.props.allLanguages.find( + lang => lang.id === cv.comment.language_id + )?.name + } + + )} {/* This is an expanding spacer for mobile */}
{showScores() && ( diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index fd9b883..916c8c9 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -344,13 +344,15 @@ export class PostListing extends Component { )} - - { - this.props.allLanguages.find( - lang => lang.id === post_view.post.language_id - )?.name - } - + {post_view.post.language_id != 0 && ( + + { + this.props.allLanguages.find( + lang => lang.id === post_view.post.language_id + )?.name + } + + )}
  • •
  • {url && !(hostname(url) === getExternalHost()) && ( <> -- 2.44.1