Change background of the "muted" icon
This commit is contained in:
parent
3cc541db82
commit
8f675cdc16
4 changed files with 55 additions and 15 deletions
|
@ -3745,12 +3745,14 @@ button.module-image__border-overlay:focus {
|
||||||
z-index: $z-index-above-base;
|
z-index: $z-index-above-base;
|
||||||
|
|
||||||
&__contact-name {
|
&__contact-name {
|
||||||
|
font-size: 12px;
|
||||||
color: $color-white;
|
color: $color-white;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
margin-bottom: 2px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3902,10 +3904,6 @@ button.module-image__border-overlay:focus {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
.module-ongoing-call__group-call-remote-participant--audio-muted::after {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
// The avatar image can be dragged on Windows.
|
// The avatar image can be dragged on Windows.
|
||||||
.module-Avatar img {
|
.module-Avatar img {
|
||||||
-webkit-user-drag: none;
|
-webkit-user-drag: none;
|
||||||
|
|
|
@ -2,13 +2,36 @@
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
.CallingAudioIndicator {
|
.CallingAudioIndicator {
|
||||||
$size: 14px;
|
$size: 20px;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
height: $size;
|
height: $size;
|
||||||
min-width: $size;
|
min-width: $size;
|
||||||
width: $size;
|
width: $size;
|
||||||
z-index: $z-index-base;
|
z-index: $z-index-base;
|
||||||
|
border-radius: calc($size / 2);
|
||||||
|
|
||||||
|
&--with-content {
|
||||||
|
background: $color-black-alpha-30;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__content {
|
||||||
|
$size: 14px;
|
||||||
|
width: $size;
|
||||||
|
height: $size;
|
||||||
|
|
||||||
|
/* Center Lottie animation */
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
&--muted {
|
&--muted {
|
||||||
@include color-svg('../images/icons/v2/mic-off-solid-28.svg', $color-white);
|
@include color-svg(
|
||||||
|
'../images/icons/v2/mic-off-solid-28.svg',
|
||||||
|
$color-white
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// Copyright 2022 Signal Messenger, LLC
|
// Copyright 2022 Signal Messenger, LLC
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
|
import classNames from 'classnames';
|
||||||
import { noop } from 'lodash';
|
import { noop } from 'lodash';
|
||||||
import type { ReactElement } from 'react';
|
import type { ReactElement } from 'react';
|
||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
|
@ -9,6 +10,9 @@ import { Lottie } from './Lottie';
|
||||||
|
|
||||||
const SPEAKING_LINGER_MS = 100;
|
const SPEAKING_LINGER_MS = 100;
|
||||||
|
|
||||||
|
const BASE_CLASS_NAME = 'CallingAudioIndicator';
|
||||||
|
const CONTENT_CLASS_NAME = `${BASE_CLASS_NAME}__content`;
|
||||||
|
|
||||||
export function CallingAudioIndicator({
|
export function CallingAudioIndicator({
|
||||||
hasAudio,
|
hasAudio,
|
||||||
isSpeaking,
|
isSpeaking,
|
||||||
|
@ -31,16 +35,35 @@ export function CallingAudioIndicator({
|
||||||
|
|
||||||
if (!hasAudio) {
|
if (!hasAudio) {
|
||||||
return (
|
return (
|
||||||
<div className="CallingAudioIndicator CallingAudioIndicator--muted" />
|
<div
|
||||||
|
className={classNames(
|
||||||
|
BASE_CLASS_NAME,
|
||||||
|
`${BASE_CLASS_NAME}--with-content`
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className={classNames(
|
||||||
|
CONTENT_CLASS_NAME,
|
||||||
|
`${CONTENT_CLASS_NAME}--muted`
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shouldShowSpeaking) {
|
if (shouldShowSpeaking) {
|
||||||
return (
|
return (
|
||||||
<Lottie animationData={animationData} className="CallingAudioIndicator" />
|
<div
|
||||||
|
className={classNames(
|
||||||
|
BASE_CLASS_NAME,
|
||||||
|
`${BASE_CLASS_NAME}--with-content`
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<Lottie animationData={animationData} className={CONTENT_CLASS_NAME} />
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Render an empty spacer so that names don't move around.
|
// Render an empty spacer so that names don't move around.
|
||||||
return <div className="CallingAudioIndicator" />;
|
return <div className={BASE_CLASS_NAME} />;
|
||||||
}
|
}
|
||||||
|
|
|
@ -273,11 +273,7 @@ export const GroupCallRemoteParticipant: React.FC<PropsType> = React.memo(
|
||||||
{!props.isInPip && (
|
{!props.isInPip && (
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
'module-ongoing-call__group-call-remote-participant__info',
|
'module-ongoing-call__group-call-remote-participant__info'
|
||||||
{
|
|
||||||
'module-ongoing-call__group-call-remote-participant__info--audio-muted':
|
|
||||||
!hasRemoteAudio,
|
|
||||||
}
|
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<ContactName
|
<ContactName
|
||||||
|
|
Loading…
Reference in a new issue