From: SleeplessOne1917 Date: Mon, 3 Jul 2023 12:29:55 +0000 (+0000) Subject: Merge branch 'main' into fix/fix-badges-spacing-componentize X-Git-Url: http://these/git/?a=commitdiff_plain;h=34f04e6758d53bfccbdda2cbb0adde21e9a0cffa;hp=-c;p=lemmy-ui.git Merge branch 'main' into fix/fix-badges-spacing-componentize --- 34f04e6758d53bfccbdda2cbb0adde21e9a0cffa diff --combined src/shared/components/person/profile.tsx index cc334db,86b01d5..ec7538b --- a/src/shared/components/person/profile.tsx +++ b/src/shared/components/person/profile.tsx @@@ -5,6 -5,7 +5,6 @@@ import enableDownvotes, enableNsfw, getCommentParentId, - getRoleLabelPill, myAuth, myAuthRequired, setIsoData, @@@ -84,7 -85,6 +84,7 @@@ import { HtmlTags } from "../common/htm import { Icon, Spinner } from "../common/icon"; import { MomentTime } from "../common/moment-time"; import { SortSelect } from "../common/sort-select"; +import { UserBadges } from "../common/user-badges"; import { CommunityLink } from "../community/community-link"; import { PersonDetails } from "./person-details"; import { PersonListing } from "./person-listing"; @@@ -137,7 -137,7 +137,7 @@@ const getCommunitiesListing = communityViews.length > 0 && (
-
{I18NextService.i18n.t(translationKey)}
+

{I18NextService.i18n.t(translationKey)}

    {communityViews.map(({ community }) => (
  • @@@ -472,7 -472,7 +472,7 @@@ export class Profile extends Component
    {pv.person.display_name && ( -
    {pv.person.display_name}
    +

    {pv.person.display_name}

    )}
    • @@@ -484,15 -484,46 +484,15 @@@ hideAvatar />
    • - {isBanned(pv.person) && ( -
    • - {getRoleLabelPill({ - label: I18NextService.i18n.t("banned"), - tooltip: I18NextService.i18n.t("banned"), - classes: "text-bg-danger", - shrink: false, - })} -
    • - )} - {pv.person.deleted && ( -
    • - {getRoleLabelPill({ - label: I18NextService.i18n.t("deleted"), - tooltip: I18NextService.i18n.t("deleted"), - classes: "text-bg-danger", - shrink: false, - })} -
    • - )} - {pv.person.admin && ( -
    • - {getRoleLabelPill({ - label: I18NextService.i18n.t("admin"), - tooltip: I18NextService.i18n.t("admin"), - shrink: false, - })} -
    • - )} - {pv.person.bot_account && ( -
    • - {getRoleLabelPill({ - label: I18NextService.i18n - .t("bot_account") - .toLowerCase(), - tooltip: I18NextService.i18n.t("bot_account"), - shrink: false, - })} -
    • - )} +
    • + +
    {this.banDialog(pv)} diff --combined src/shared/components/post/post-listing.tsx index 2900407,3f55ceb..a4ce5db --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@@ -1,4 -1,4 +1,4 @@@ -import { getRoleLabelPill, myAuthRequired } from "@utils/app"; +import { myAuthRequired } from "@utils/app"; import { canShare, share } from "@utils/browser"; import { getExternalHost, getHttpBase } from "@utils/env"; import { @@@ -55,7 -55,6 +55,7 @@@ import { setupTippy } from "../../tippy import { Icon, PurgeWarning, Spinner } from "../common/icon"; import { MomentTime } from "../common/moment-time"; import { PictrsImage } from "../common/pictrs-image"; +import { UserBadges } from "../common/user-badges"; import { VoteButtons, VoteButtonsCompact } from "../common/vote-buttons"; import { CommunityLink } from "../community/community-link"; import { PersonListing } from "../person/person-listing"; @@@ -407,13 -406,26 +407,13 @@@ export class PostListing extends Compon return (
    - - - - {this.creatorIsMod_ && - getRoleLabelPill({ - label: I18NextService.i18n.t("mod"), - tooltip: I18NextService.i18n.t("mod"), - classes: "text-bg-primary", - })} - {this.creatorIsAdmin_ && - getRoleLabelPill({ - label: I18NextService.i18n.t("admin"), - tooltip: I18NextService.i18n.t("admin"), - classes: "text-bg-danger", - })} - {post_view.creator.bot_account && - getRoleLabelPill({ - label: I18NextService.i18n.t("bot_account").toLowerCase(), - tooltip: I18NextService.i18n.t("bot_account"), - })} + + {this.props.showCommunity && ( <> {" "} @@@ -466,7 -478,7 +466,7 @@@ return ( <>