fix(user-list): center icons on safari

Centers icons indicating presenter, audio state and whiteboard access in the
user list.
This commit is contained in:
Arthurk12 2023-09-12 15:39:34 -03:00
parent 74e8a6e593
commit f92d3a1ca5
2 changed files with 7 additions and 24 deletions

View File

@ -37,7 +37,7 @@ const defaultProps = {
};
const { animations } = Settings.application;
const { isChrome, isFirefox, isEdge } = browserInfo;
const { isSafari } = browserInfo;
const UserAvatar = ({
children,
@ -70,10 +70,7 @@ const UserAvatar = ({
listenOnly={listenOnly}
voice={voice}
noVoice={noVoice && !listenOnly}
isChrome={isChrome}
isFirefox={isFirefox}
isEdge={isEdge}
className={className}
isSafari={isSafari}
style={{
backgroundColor: color,
color, // We need the same color on both for the border

View File

@ -118,7 +118,7 @@ const Avatar = styled.div`
width: 0;
height: 0;
padding-top: .5rem;
padding-right: 0;
padding-right: ${({ isSafari }) => isSafari ? '.6rem' : '0'};
padding-left: 0;
padding-bottom: 0;
color: inherit;
@ -158,7 +158,6 @@ const Avatar = styled.div`
${({ presenter }) => presenter && `
&:before {
content: "\\00a0\\e90b\\00a0";
padding: ${mdPaddingY} !important;
opacity: 1;
top: ${userIndicatorsOffset};
left: ${userIndicatorsOffset};
@ -166,6 +165,8 @@ const Avatar = styled.div`
right: auto;
border-radius: 5px;
background-color: ${colorPrimary};
height: 1.2rem;
width: 1.2rem;
[dir="rtl"] & {
left: auto;
@ -175,18 +176,9 @@ const Avatar = styled.div`
}
`}
${({
presenter, isChrome, isFirefox, isEdge,
}) => presenter && (isChrome || isFirefox || isEdge) && `
&:before {
padding: ${indicatorPadding} !important;
}
`}
${({ whiteboardAccess }) => whiteboardAccess && `
&:before {
content: "\\00a0\\e925\\00a0";
padding: ${mdPaddingY} !important;
border-radius: 50% !important;
opacity: 1;
top: ${userIndicatorsOffset};
@ -195,6 +187,8 @@ const Avatar = styled.div`
right: auto;
border-radius: 5px;
background-color: ${colorPrimary};
height: 1.2rem;
width: 1.2rem;
[dir="rtl"] & {
left: auto;
@ -205,14 +199,6 @@ const Avatar = styled.div`
}
`}
${({
whiteboardAccess, isChrome, isFirefox, isEdge,
}) => whiteboardAccess && (isChrome || isFirefox || isEdge) && `
&:before {
padding: ${indicatorPadding};
}
`}
${({ voice }) => voice && `
&:after {
content: "\\00a0\\e931\\00a0";