Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distinguish "Creator" badge on comments #1623

Merged
merged 13 commits into from
Jun 27, 2023
22 changes: 13 additions & 9 deletions src/shared/components/comment/comment-node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -315,24 +315,28 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
<Icon icon="shield" inline classes="text-danger me-2" />
)}
{this.isPostCreator && (
<div className="badge text-bg-light d-none d-sm-inline me-2">
{I18NextService.i18n.t("creator")}
</div>
<span
className="badge text-info text-bg-light d-sm-inline me-2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need d-sm-inline here anymore

aria-label={I18NextService.i18n.t("creator")}
data-tippy-content={I18NextService.i18n.t("creator")}
>
{I18NextService.i18n.t("op")}
</span>
)}
{isMod_ && (
<div className="badge text-bg-light d-none d-sm-inline me-2">
<span className="badge text-bg-light d-none d-sm-inline me-2">
{I18NextService.i18n.t("mod")}
</div>
</span>
)}
{isAdmin_ && (
<div className="badge text-bg-light d-none d-sm-inline me-2">
<span className="badge text-bg-light d-none d-sm-inline me-2">
{I18NextService.i18n.t("admin")}
</div>
</span>
)}
{cv.creator.bot_account && (
<div className="badge text-bg-light d-none d-sm-inline me-2">
<span className="badge text-bg-light d-none d-sm-inline me-2">
{I18NextService.i18n.t("bot_account").toLowerCase()}
</div>
</span>
)}
{this.props.showCommunity && (
<>
Expand Down