Merge pull request #18958 from Arthurk12/bbb/2.7/18763-1

fix(user-list): center icons on apple devices
This commit is contained in:
Ramón Souza 2023-10-23 11:39:37 -03:00 committed by GitHub
commit ed44b33b15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 14 deletions

View File

@ -2,7 +2,6 @@ import React from 'react';
import PropTypes from 'prop-types';
import Settings from '/imports/ui/services/settings';
import Styled from './styles';
import deviceInfo from '/imports/utils/deviceInfo';
const propTypes = {
children: PropTypes.node,
@ -37,7 +36,6 @@ const defaultProps = {
};
const { animations } = Settings.application;
const { isIos } = deviceInfo;
const UserAvatar = ({
children,
@ -70,7 +68,6 @@ const UserAvatar = ({
listenOnly={listenOnly}
voice={voice}
noVoice={noVoice && !listenOnly}
isIos={isIos}
style={{
backgroundColor: color,
color, // We need the same color on both for the border

View File

@ -117,10 +117,6 @@ const Avatar = styled.div`
position: absolute;
width: 0;
height: 0;
padding-top: .5rem;
padding-right: ${({ isIos }) => isIos ? '.6rem;' : '0;'};;
padding-left: 0;
padding-bottom: 0;
color: inherit;
top: auto;
left: auto;
@ -135,14 +131,11 @@ const Avatar = styled.div`
font-size: .65rem;
line-height: 0;
text-align: center;
vertical-align: middle;
letter-spacing: -.65rem;
z-index: 1;
[dir="rtl"] & {
left: ${userIndicatorsOffset};
right: auto;
padding-right: .65rem;
padding-left: 0;
}
@ -167,12 +160,13 @@ const Avatar = styled.div`
background-color: ${colorPrimary};
height: 1.2rem;
width: 1.2rem;
display: flex;
justify-content: center;
align-items: center;
[dir="rtl"] & {
left: auto;
padding-right: .3rem !important;
right: ${userIndicatorsOffset};
letter-spacing: -.33rem;
}
}
`}
@ -190,12 +184,13 @@ const Avatar = styled.div`
background-color: ${colorPrimary};
height: 1.2rem;
width: 1.2rem;
display: flex;
justify-content: center;
align-items: center;
[dir="rtl"] & {
left: auto;
padding-right: .3rem !important;
right: ${userIndicatorsOffset};
letter-spacing: -.33rem;
transform: scale(-1, 1);
}
}
@ -216,6 +211,9 @@ const Avatar = styled.div`
opacity: 1;
width: 1.2rem;
height: 1.2rem;
display: flex;
justify-content: center;
align-items: center;
}
`}
@ -226,6 +224,9 @@ const Avatar = styled.div`
opacity: 1;
width: 1.2rem;
height: 1.2rem;
display: flex;
justify-content: center;
align-items: center;
}
`}
@ -235,6 +236,9 @@ const Avatar = styled.div`
opacity: 1;
width: 1.2rem;
height: 1.2rem;
display: flex;
justify-content: center;
align-items: center;
}
`}