(cherry picked from commit 573c78481ead916e5925836fa1e992456cb671c5) Co-authored-by: M-ZubairAhmed <m-zubairahmed@protonmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
628e088715
Коммит
4c718c4b9a
@@ -100,7 +100,7 @@ export default class PostProfilePicture extends React.PureComponent<Props> {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ProfilePicture
|
<ProfilePicture
|
||||||
size='md'
|
size={this.props.compactDisplay ? 'inherit' : 'md'}
|
||||||
src={src}
|
src={src}
|
||||||
profileSrc={profileSrc}
|
profileSrc={profileSrc}
|
||||||
isEmoji={isEmoji}
|
isEmoji={isEmoji}
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ function ProfilePicture(props: Props) {
|
|||||||
triggerComponentAs='button'
|
triggerComponentAs='button'
|
||||||
triggerComponentStyle={{
|
triggerComponentStyle={{
|
||||||
borderRadius: '50%',
|
borderRadius: '50%',
|
||||||
width: `${getAvatarWidth(props?.size ?? 'md')}px`,
|
width: getAvatarWidth(props?.size ?? 'md'),
|
||||||
height: `${getAvatarWidth(props?.size ?? 'md')}px`,
|
height: getAvatarWidth(props?.size ?? 'md'),
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -12,30 +12,30 @@ import BotDefaultIcon from 'images/bot_default_icon.png';
|
|||||||
|
|
||||||
import './avatar.scss';
|
import './avatar.scss';
|
||||||
|
|
||||||
export type TAvatarSizeToken = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xl-custom-GM' | 'xl-custom-DM' | 'xxl';
|
export type TAvatarSizeToken = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xl-custom-GM' | 'xl-custom-DM' | 'xxl' | 'inherit';
|
||||||
|
|
||||||
export const getAvatarWidth = (size: TAvatarSizeToken) => {
|
export const getAvatarWidth = (size: TAvatarSizeToken) => {
|
||||||
switch (size) {
|
switch (size) {
|
||||||
case 'xxs':
|
case 'xxs':
|
||||||
return 16;
|
return '16px';
|
||||||
case 'xs':
|
case 'xs':
|
||||||
return 20;
|
return '20px';
|
||||||
case 'sm':
|
case 'sm':
|
||||||
return 24;
|
return '24px';
|
||||||
case 'md':
|
case 'md':
|
||||||
return 32;
|
return '32px';
|
||||||
case 'lg':
|
case 'lg':
|
||||||
return 36;
|
return '36px';
|
||||||
case 'xl':
|
case 'xl':
|
||||||
return 50;
|
return '50px';
|
||||||
case 'xl-custom-GM':
|
case 'xl-custom-GM':
|
||||||
return 72;
|
return '72px';
|
||||||
case 'xl-custom-DM':
|
case 'xl-custom-DM':
|
||||||
return 96;
|
return '96px';
|
||||||
case 'xxl':
|
case 'xxl':
|
||||||
return 128;
|
return '128px';
|
||||||
}
|
}
|
||||||
return 0;
|
return 'inherit';
|
||||||
};
|
};
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|||||||
@@ -749,10 +749,8 @@
|
|||||||
|
|
||||||
.post__img {
|
.post__img {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
padding-top: 1px;
|
|
||||||
|
|
||||||
img,
|
.profile-icon {
|
||||||
button {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -807,11 +805,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.status-wrapper {
|
.status-wrapper {
|
||||||
height: 14px;
|
|
||||||
|
|
||||||
.status {
|
.status {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: auto;
|
top: 1px;
|
||||||
right: auto;
|
right: auto;
|
||||||
bottom: auto;
|
bottom: auto;
|
||||||
left: -2px;
|
left: -2px;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user