Show bot account info. Fixes #458 (#463)

This commit is contained in:
Dessalines 2021-10-17 21:44:02 -04:00 committed by GitHub
parent 107c46104e
commit d664b03ab3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 0 deletions

View 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")}

View 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>

View 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>