X-Git-Url: http://these/git/?a=blobdiff_plain;f=src%2Fshared%2Fcomponents%2Fperson%2Fprofile.tsx;h=cc334db5ee5449381c02fad9fa08981e879ae754;hb=9869b911cf480ee88c7b1e7d2f689cc2e1c65157;hp=d00036871a04c9ec922c93a56e5c9b6eb43fec8b;hpb=dfe394adca9da70664e52556712459c33356c4ae;p=lemmy-ui.git diff --git a/src/shared/components/person/profile.tsx b/src/shared/components/person/profile.tsx index d000368..cc334db 100644 --- a/src/shared/components/person/profile.tsx +++ b/src/shared/components/person/profile.tsx @@ -23,6 +23,8 @@ import { canMod, isAdmin, isBanned } from "@utils/roles"; import type { QueryParams } from "@utils/types"; import { RouteDataResponse } from "@utils/types"; import classNames from "classnames"; +import format from "date-fns/format"; +import parseISO from "date-fns/parseISO"; import { NoOptionI18nKeys } from "i18next"; import { Component, linkEvent } from "inferno"; import { Link } from "inferno-router"; @@ -70,7 +72,6 @@ import { SortType, TransferCommunity, } from "lemmy-js-client"; -import moment from "moment"; import { fetchLimit, relTags } from "../../config"; import { InitialFetchRequest, PersonDetailsView } from "../../interfaces"; import { mdToHtml } from "../../markdown"; @@ -83,6 +84,7 @@ import { HtmlTags } from "../common/html-tags"; 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"; @@ -204,6 +206,7 @@ export class Profile extends Component< this.handleSavePost = this.handleSavePost.bind(this); this.handlePurgePost = this.handlePurgePost.bind(this); this.handleFeaturePost = this.handleFeaturePost.bind(this); + this.handleModBanSubmit = this.handleModBanSubmit.bind(this); // Only fetch the data if coming from another route if (FirstLoadService.isFirstLoad) { @@ -481,26 +484,15 @@ export class Profile extends Component< hideAvatar /> - {isBanned(pv.person) && ( -
  • - {I18NextService.i18n.t("banned")} -
  • - )} - {pv.person.deleted && ( -
  • - {I18NextService.i18n.t("deleted")} -
  • - )} - {pv.person.admin && ( -
  • - {I18NextService.i18n.t("admin")} -
  • - )} - {pv.person.bot_account && ( -
  • - {I18NextService.i18n.t("bot_account").toLowerCase()} -
  • - )} +
  • + +
  • {this.banDialog(pv)} @@ -613,10 +605,7 @@ export class Profile extends Component< {I18NextService.i18n.t("cake_day_title")}{" "} - {moment - .utc(pv.person.published) - .local() - .format("MMM DD, YYYY")} + {format(parseISO(pv.person.published), "PPP")} {!UserService.Instance.myUserInfo && ( @@ -649,12 +638,12 @@ export class Profile extends Component< value={this.state.banReason} onInput={linkEvent(this, this.handleModBanReasonChange)} /> -