]> Untitled Git - lemmy-ui.git/commitdiff
Show bot account info. Fixes #458 (#463)
authorDessalines <dessalines@users.noreply.github.com>
Mon, 18 Oct 2021 01:44:02 +0000 (21:44 -0400)
committerGitHub <noreply@github.com>
Mon, 18 Oct 2021 01:44:02 +0000 (21:44 -0400)
src/shared/components/comment/comment-node.tsx
src/shared/components/person/profile.tsx
src/shared/components/post/post-listing.tsx

index 8f831ce400f71e3ee93739a57b31a0b47af1bf5d..deea4b9a3b788311d8fb7885d21ddd2aee1872da 100644 (file)
@@ -182,6 +182,11 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                   {i18n.t("creator")}
                 </div>
               )}
+              {cv.creator.bot_account && (
+                <div className="badge badge-light d-none d-sm-inline mr-2">
+                  {i18n.t("bot_account").toLowerCase()}
+                </div>
+              )}
               {(cv.creator_banned_from_community || cv.creator.banned) && (
                 <div className="badge badge-danger mr-2">
                   {i18n.t("banned")}
index 1dcd8e5d3b2e4262ea2304bde1013ce19e8d2dae..eca26e8d09dfb1d2bb004d98e99c2e7316c0ec82 100644 (file)
@@ -370,6 +370,16 @@ export class Profile extends Component<any, ProfileState> {
                       {i18n.t("banned")}
                     </li>
                   )}
+                  {pv.person.admin && (
+                    <li className="list-inline-item badge badge-light">
+                      {i18n.t("admin")}
+                    </li>
+                  )}
+                  {pv.person.bot_account && (
+                    <li className="list-inline-item badge badge-light">
+                      {i18n.t("bot_account").toLowerCase()}
+                    </li>
+                  )}
                 </ul>
               </div>
               <div className="flex-grow-1 unselectable pointer mx-2"></div>
index 6c8b0e34fba407e46ab4530cc5b9eb6d7d992d99..96c73198e22717429692c1fba220635ec2ea58a7 100644 (file)
@@ -288,6 +288,11 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
           {this.isAdmin && (
             <span className="mx-1 badge badge-light">{i18n.t("admin")}</span>
           )}
+          {post_view.creator.bot_account && (
+            <span className="mx-1 badge badge-light">
+              {i18n.t("bot_account").toLowerCase()}
+            </span>
+          )}
           {(post_view.creator_banned_from_community ||
             post_view.creator.banned) && (
             <span className="mx-1 badge badge-danger">{i18n.t("banned")}</span>