mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2025-01-08 19:21:27 +00:00
Don't show icons / banners for banned users and removed communities. (#962)
- Fixes #961
This commit is contained in:
parent
1ad36d2c1d
commit
9bab9c3cab
4 changed files with 15 additions and 8 deletions
|
@ -58,9 +58,10 @@ export class CommunityLink extends Component<CommunityLinkProps, any> {
|
|||
let icon = this.props.community.icon;
|
||||
return (
|
||||
<>
|
||||
{!this.props.hideAvatar && showAvatars() && icon && (
|
||||
<PictrsImage src={icon} icon />
|
||||
)}
|
||||
{!this.props.hideAvatar &&
|
||||
!this.props.community.removed &&
|
||||
showAvatars() &&
|
||||
icon && <PictrsImage src={icon} icon />}
|
||||
<span className="overflow-wrap-anywhere">{displayName}</span>
|
||||
</>
|
||||
);
|
||||
|
|
|
@ -119,7 +119,7 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
|
|||
return (
|
||||
<div>
|
||||
<h5 className="mb-0">
|
||||
{this.props.showIcon && (
|
||||
{this.props.showIcon && !community.removed && (
|
||||
<BannerIconHeader icon={community.icon} banner={community.banner} />
|
||||
)}
|
||||
<span className="mr-2">{community.title}</span>
|
||||
|
|
|
@ -73,9 +73,10 @@ export class PersonListing extends Component<PersonListingProps, any> {
|
|||
let avatar = this.props.person.avatar;
|
||||
return (
|
||||
<>
|
||||
{avatar && !this.props.hideAvatar && showAvatars() && (
|
||||
<PictrsImage src={avatar} icon />
|
||||
)}
|
||||
{avatar &&
|
||||
!this.props.hideAvatar &&
|
||||
!this.props.person.banned &&
|
||||
showAvatars() && <PictrsImage src={avatar} icon />}
|
||||
<span>{displayName}</span>
|
||||
</>
|
||||
);
|
||||
|
|
|
@ -384,7 +384,12 @@ export class Profile extends Component<any, ProfileState> {
|
|||
return (
|
||||
pv && (
|
||||
<div>
|
||||
<BannerIconHeader banner={pv.person.banner} icon={pv.person.avatar} />
|
||||
{!isBanned(pv.person) && (
|
||||
<BannerIconHeader
|
||||
banner={pv.person.banner}
|
||||
icon={pv.person.avatar}
|
||||
/>
|
||||
)}
|
||||
<div className="mb-3">
|
||||
<div className="">
|
||||
<div className="mb-0 d-flex flex-wrap">
|
||||
|
|
Loading…
Reference in a new issue