| { | { | ||||
| "name": "web", | "name": "web", | ||||
| "version": "4.0.3", | |||||
| "version": "4.0.5", | |||||
| "lockfileVersion": 1, | "lockfileVersion": 1, | ||||
| "requires": true, | "requires": true, | ||||
| "dependencies": { | "dependencies": { |
| <BlockedIconContainer | <BlockedIconContainer | ||||
| aboveTitle={props.aboveTitle} | aboveTitle={props.aboveTitle} | ||||
| chatCard={props.chatCard} | chatCard={props.chatCard} | ||||
| > | > | ||||
| <BlockedIcon /> | |||||
| <BlockedIcon redText={props.redText} /> | |||||
| </BlockedIconContainer> | </BlockedIconContainer> | ||||
| )} | )} | ||||
| </BlockedContainer> | </BlockedContainer> |
| left: -2px; | left: -2px; | ||||
| } | } | ||||
| & path { | & path { | ||||
| stroke: white; | |||||
| stroke: ${(props) => | |||||
| props.redText ? selectedTheme.colors.blockedColor : "white"}; | |||||
| } | } | ||||
| `; | `; |
| ProfileInfoAndContactContainer, | ProfileInfoAndContactContainer, | ||||
| UnblockButton, | UnblockButton, | ||||
| UnblockIcon, | UnblockIcon, | ||||
| BlockedProfileContainer, | |||||
| } from "./ProfileCard.styled"; | } from "./ProfileCard.styled"; | ||||
| import PersonOutlineIcon from "@mui/icons-material/PersonOutline"; | import PersonOutlineIcon from "@mui/icons-material/PersonOutline"; | ||||
| import { useRouteMatch } from "react-router-dom"; | import { useRouteMatch } from "react-router-dom"; | ||||
| isMyProfile={isMyProfile} | isMyProfile={isMyProfile} | ||||
| blocked={!props.isAdmin && profile?._blocked} | blocked={!props.isAdmin && profile?._blocked} | ||||
| > | > | ||||
| {profile?._blocked && isMobile && props.isAdmin && ( | |||||
| <BlockedProfileContainer> | |||||
| <BlockedProfile hideIcon redText aboveTitle isAdmin /> | |||||
| </BlockedProfileContainer> | |||||
| )} | |||||
| <ButtonsContainer> | <ButtonsContainer> | ||||
| {profile?._blocked && !isMobile && <BlockedProfile />} | {profile?._blocked && !isMobile && <BlockedProfile />} | ||||
| {props.isAdmin && ( | {props.isAdmin && ( | ||||
| )} | )} | ||||
| </ButtonsContainer> | </ButtonsContainer> | ||||
| <ProfileInfoContainer> | <ProfileInfoContainer> | ||||
| <ProfileInfoAndContactContainer isAdmin={props.isAdmin} bigProfileCard={props.bigProfileCard}> | |||||
| <ProfileInfoAndContactContainer | |||||
| isAdmin={props.isAdmin} | |||||
| bigProfileCard={props.bigProfileCard} | |||||
| > | |||||
| {profile?._blocked && !props.isAdmin && isMobile && ( | {profile?._blocked && !props.isAdmin && isMobile && ( | ||||
| <BlockedProfile aboveTitle isAdmin={props.isAdmin} /> | <BlockedProfile aboveTitle isAdmin={props.isAdmin} /> | ||||
| )} | )} |
| } | } | ||||
| `; | `; | ||||
| export const BlockButton = styled(Box)` | export const BlockButton = styled(Box)` | ||||
| width: 40px; | width: 40px; | ||||
| height: 40px; | height: 40px; | ||||
| export const ProfileInfoAndContactContainer = styled(Box)` | export const ProfileInfoAndContactContainer = styled(Box)` | ||||
| display: flex; | display: flex; | ||||
| flex-direction: column; | flex-direction: column; | ||||
| margin-bottom: ${props => props.isAdmin && "36px"}; | |||||
| margin-bottom: ${(props) => props.isAdmin && "36px"}; | |||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| padding-bottom: ${props => props.isAdmin ? '0' : '18px'}; | |||||
| margin-bottom: ${props => props.isAdmin && '0'}; | |||||
| ${props => props.bigProfileCard && 'gap: 18px;'} | |||||
| flex-direction: ${props => props.bigProfileCard ? "row" : "column"}; | |||||
| padding-bottom: ${(props) => (props.isAdmin ? "0" : "18px")}; | |||||
| margin-bottom: ${(props) => props.isAdmin && "0"}; | |||||
| ${(props) => props.bigProfileCard && "gap: 18px;"} | |||||
| flex-direction: ${(props) => (props.bigProfileCard ? "row" : "column")}; | |||||
| } | } | ||||
| `; | `; | ||||
| // justify-content: center; | // justify-content: center; | ||||
| // align-items: start; | // align-items: start; | ||||
| // `; | // `; | ||||
| export const BlockedProfileContainer = styled(Box)` | |||||
| @media (max-width: 600px) { | |||||
| position: absolute; | |||||
| top: 16px; | |||||
| left: 16px; | |||||
| } | |||||
| `; |
| )} | )} | ||||
| /> | /> | ||||
| </AvatarImageContainer> | </AvatarImageContainer> | ||||
| <ProfileMainInfoGrid> | |||||
| {props.profile?._blocked && props.isAdmin && ( | |||||
| <BlockedProfile hideIcon redText aboveTitle isAdmin /> | |||||
| )} | |||||
| <ProfileMainInfoGrid bigProfileCard={props.bigProfileCard}> | |||||
| {props.profile?._blocked && | |||||
| props.isAdmin && | |||||
| (!isMobile || (isMobile && props.bigProfileCard)) && ( | |||||
| <BlockedProfile hideIcon redText aboveTitle isAdmin /> | |||||
| )} | |||||
| <ProfileName | <ProfileName | ||||
| bigProfileCard={props.bigProfileCard} | |||||
| bigProfileCard={props.bigProfileCard} | |||||
| isAdmin={props.isAdmin} | isAdmin={props.isAdmin} | ||||
| isMyProfile={props.isMyProfile} | isMyProfile={props.isMyProfile} | ||||
| isBlocked={props.isBlocked} | isBlocked={props.isBlocked} | ||||
| bigProfileCard: PropTypes.bool, | bigProfileCard: PropTypes.bool, | ||||
| isBlocked: PropTypes.bool, | isBlocked: PropTypes.bool, | ||||
| }; | }; | ||||
| ProfileMainInfo.defaultProps = { | |||||
| isAdmin: false, | |||||
| bigProfileCard: false, | |||||
| isBlocked: false, | |||||
| isMyProfile: false, | |||||
| }; | |||||
| export default ProfileMainInfo; | export default ProfileMainInfo; |
| align-items: center; | align-items: center; | ||||
| position: relative; | position: relative; | ||||
| top: 36px; | top: 36px; | ||||
| max-width: none; | |||||
| `} | `} | ||||
| } | } | ||||
| `; | `; | ||||
| align-items: center; | align-items: center; | ||||
| `; | `; | ||||
| export const AvatarImage = styled.img` | export const AvatarImage = styled.img` | ||||
| border: 1px solid black; | |||||
| /* border: 1px solid black; */ | |||||
| min-height: ${(props) => (props.isAdmin ? `108px` : `144px`)}; | min-height: ${(props) => (props.isAdmin ? `108px` : `144px`)}; | ||||
| min-width: ${(props) => (props.isAdmin ? `108px` : `144px`)}; | min-width: ${(props) => (props.isAdmin ? `108px` : `144px`)}; | ||||
| width: ${(props) => (props.isAdmin ? `108px` : `144px`)}; | width: ${(props) => (props.isAdmin ? `108px` : `144px`)}; | ||||
| margin-left: 16px; | margin-left: 16px; | ||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| margin-left: 0; | margin-left: 0; | ||||
| ${props => props.bigProfileCard && css` | |||||
| width: calc(100vw - 196px); | |||||
| `} | |||||
| } | } | ||||
| `; | `; | ||||
| export const ProfileName = styled(Typography)` | export const ProfileName = styled(Typography)` |