]> Untitled Git - lemmy-ui.git/commitdiff
Changes to language tag
authorFelix Ableitner <me@nutomic.com>
Tue, 23 May 2023 20:16:54 +0000 (22:16 +0200)
committerFelix Ableitner <me@nutomic.com>
Tue, 23 May 2023 20:16:54 +0000 (22:16 +0200)
- Dont use bright white color because its not that important
- Hide tag in case of undetermined (doesnt add any information)

lemmy-translations
src/shared/components/comment/comment-node.tsx
src/shared/components/post/post-listing.tsx

index a1fff8b481f4b02327e4ee04088606af627628f2..007e53683768aeba63e9e4c179c1d240217bcee2 160000 (submodule)
@@ -1 +1 @@
-Subproject commit a1fff8b481f4b02327e4ee04088606af627628f2
+Subproject commit 007e53683768aeba63e9e4c179c1d240217bcee2
index d2dee1e87d522996271035bdc92d5d5c6f7bacf8..83477864574e1c7855a3c38a36b07d55c733f425 100644 (file)
@@ -283,13 +283,15 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                 )}
               </button>
               {this.linkBtn(true)}
-              <span className="mx-1 badge badge-secondary">
-                {
-                  this.props.allLanguages.find(
-                    lang => lang.id === cv.comment.language_id
-                  )?.name
-                }
-              </span>
+              {cv.comment.language_id != 0 && (
+                <span className="">
+                  {
+                    this.props.allLanguages.find(
+                      lang => lang.id === cv.comment.language_id
+                    )?.name
+                  }
+                </span>
+              )}
               {/* This is an expanding spacer for mobile */}
               <div className="mr-lg-5 flex-grow-1 flex-lg-grow-0 unselectable pointer mx-2" />
               {showScores() && (
index fd9b883e4afdedc6b5dece182a83450b7361fa15..916c8c932fe7bddbf0ea8b9758b69196cc0fee49 100644 (file)
@@ -344,13 +344,15 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
             </span>
           )}
         </li>
-        <span className="mx-1 badge badge-secondary">
-          {
-            this.props.allLanguages.find(
-              lang => lang.id === post_view.post.language_id
-            )?.name
-          }
-        </span>
+        {post_view.post.language_id != 0 && (
+          <span className="list-inline-item">
+            {
+              this.props.allLanguages.find(
+                lang => lang.id === post_view.post.language_id
+              )?.name
+            }
+          </span>
+        )}
         <li className="list-inline-item">•</li>
         {url && !(hostname(url) === getExternalHost()) && (
           <>