Restyle CallLobby and ringing screens
This commit is contained in:
parent
87659ef2b5
commit
a33e7d7622
7 changed files with 77 additions and 69 deletions
|
@ -3649,27 +3649,44 @@ button.module-image__border-overlay:focus {
|
||||||
|
|
||||||
&__camera-is-off {
|
&__camera-is-off {
|
||||||
@include calling-text-shadow;
|
@include calling-text-shadow;
|
||||||
@include font-body-1;
|
align-items: center;
|
||||||
color: $color-white;
|
color: $color-white;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
flex-direction: column;
|
||||||
|
flex-grow: 1;
|
||||||
|
font-size: 15px;
|
||||||
|
line-height: 20px;
|
||||||
|
margin-block-start: 15px;
|
||||||
|
margin-block-end: 15px;
|
||||||
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
|
transition: opacity 100ms ease-out;
|
||||||
|
user-select: none;
|
||||||
z-index: $z-index-base;
|
z-index: $z-index-base;
|
||||||
margin-top: 10px;
|
|
||||||
|
|
||||||
// To match the icon height in ::before
|
|
||||||
line-height: 24px;
|
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
content: '';
|
content: '';
|
||||||
display: block;
|
display: block;
|
||||||
background-image: url('../images/icons/v3/video/video-slash-fill-white.svg');
|
background-color: $color-white;
|
||||||
background-size: 100%;
|
-webkit-mask-repeat: no-repeat;
|
||||||
-webkit-filter: drop-shadow(0 0 4px $color-black-alpha-40);
|
-webkit-mask-position: center;
|
||||||
height: 20px;
|
-webkit-mask-size: 100%;
|
||||||
margin-inline-end: 10px;
|
-webkit-mask-image: url('../images/icons/v3/video/video-slash-light.svg');
|
||||||
width: 20px;
|
height: 24px;
|
||||||
|
width: 24px;
|
||||||
|
margin-block-end: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__camera-is-off-spacer {
|
||||||
|
flex-basis: 120px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-calling__spacer {
|
||||||
|
display: flex;
|
||||||
|
flex-grow: 0;
|
||||||
|
flex-shrink: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes module-ongoing-call__controls--fade-in {
|
@keyframes module-ongoing-call__controls--fade-in {
|
||||||
|
@ -4014,7 +4031,10 @@ button.module-image__border-overlay:focus {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: $local-preview-width;
|
width: $local-preview-width;
|
||||||
box-shadow: 0px 4px 14px 0px $color-black-alpha-40;
|
|
||||||
|
&--active {
|
||||||
|
box-shadow: 0px 4px 14px 0px $color-black-alpha-40;
|
||||||
|
}
|
||||||
|
|
||||||
&__video {
|
&__video {
|
||||||
// The background-color is seen while the video loads.
|
// The background-color is seen while the video loads.
|
||||||
|
|
|
@ -5,35 +5,26 @@
|
||||||
&__local-preview {
|
&__local-preview {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: $z-index-negative;
|
z-index: $z-index-negative;
|
||||||
|
top: 28px;
|
||||||
|
|
||||||
&--camera-is-on {
|
&--camera-is-on {
|
||||||
@include lonely-local-video-preview;
|
@include lonely-local-video-preview;
|
||||||
top: 15px;
|
|
||||||
height: 100%;
|
|
||||||
max-height: calc(100% - 127px);
|
|
||||||
width: auto;
|
width: auto;
|
||||||
|
height: 100%;
|
||||||
|
max-height: calc(100% - 140px);
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
&--camera-is-off {
|
&--camera-is-off {
|
||||||
|
@include lonely-local-video-preview;
|
||||||
|
width: auto;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
max-height: calc(100% - 140px);
|
||||||
|
aspect-ratio: 4 / 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__camera-is-off {
|
&__camera-is-off {
|
||||||
@include calling-text-shadow;
|
|
||||||
@include font-subtitle;
|
|
||||||
align-items: center;
|
|
||||||
color: $color-white;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
flex-grow: 1;
|
|
||||||
justify-content: center;
|
|
||||||
text-align: center;
|
|
||||||
transition: opacity 100ms ease-out;
|
|
||||||
user-select: none;
|
|
||||||
|
|
||||||
&--visible {
|
&--visible {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
@ -41,16 +32,9 @@
|
||||||
&--invisible {
|
&--invisible {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::before {
|
|
||||||
content: '';
|
|
||||||
display: block;
|
|
||||||
background-image: url('../images/icons/v3/video/video-slash-fill-light-white.svg');
|
|
||||||
background-size: 100%;
|
|
||||||
-webkit-filter: drop-shadow(0 0 4px $color-black-alpha-40);
|
|
||||||
height: 20px;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
width: 20px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.module-CallingLobby__CallControls-spacer {
|
||||||
|
flex-basis: 70px;
|
||||||
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
.module-CallingPreCallInfo {
|
.module-CallingPreCallInfo {
|
||||||
margin-block-start: 43px;
|
margin-block-start: 15px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
|
@ -28,3 +28,8 @@
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.module-CallingPreCallInfo-spacer {
|
||||||
|
flex-basis: 64px;
|
||||||
|
margin-block-start: 25px;
|
||||||
|
}
|
||||||
|
|
|
@ -39,9 +39,11 @@ export enum AvatarSize {
|
||||||
TWENTY_EIGHT = 28,
|
TWENTY_EIGHT = 28,
|
||||||
THIRTY_TWO = 32,
|
THIRTY_TWO = 32,
|
||||||
THIRTY_SIX = 36,
|
THIRTY_SIX = 36,
|
||||||
|
FORTY = 40,
|
||||||
FORTY_EIGHT = 48,
|
FORTY_EIGHT = 48,
|
||||||
FIFTY_TWO = 52,
|
FIFTY_TWO = 52,
|
||||||
EIGHTY = 80,
|
EIGHTY = 80,
|
||||||
|
NINETY_SIX = 96,
|
||||||
}
|
}
|
||||||
|
|
||||||
type BadgePlacementType = { bottom: number; right: number };
|
type BadgePlacementType = { bottom: number; right: number };
|
||||||
|
|
|
@ -347,23 +347,7 @@ export function CallScreen({
|
||||||
<video ref={localVideoRef} autoPlay />
|
<video ref={localVideoRef} autoPlay />
|
||||||
) : (
|
) : (
|
||||||
<CallBackgroundBlur avatarPath={me.avatarPath} color={me.color}>
|
<CallBackgroundBlur avatarPath={me.avatarPath} color={me.color}>
|
||||||
<Avatar
|
<div className="module-calling__spacer module-calling__camera-is-off-spacer" />
|
||||||
acceptedMessageRequest
|
|
||||||
avatarPath={me.avatarPath}
|
|
||||||
badge={undefined}
|
|
||||||
color={me.color || AvatarColors[0]}
|
|
||||||
noteToSelf={false}
|
|
||||||
conversationType="direct"
|
|
||||||
i18n={i18n}
|
|
||||||
isMe
|
|
||||||
phoneNumber={me.phoneNumber}
|
|
||||||
profileName={me.profileName}
|
|
||||||
title={me.title}
|
|
||||||
// `sharedGroupNames` makes no sense for yourself, but `<Avatar>` needs it
|
|
||||||
// to determine blurring.
|
|
||||||
sharedGroupNames={[]}
|
|
||||||
size={AvatarSize.EIGHTY}
|
|
||||||
/>
|
|
||||||
<div className="module-calling__camera-is-off">
|
<div className="module-calling__camera-is-off">
|
||||||
{i18n('icu:calling__your-video-is-off')}
|
{i18n('icu:calling__your-video-is-off')}
|
||||||
</div>
|
</div>
|
||||||
|
@ -398,7 +382,7 @@ export function CallScreen({
|
||||||
title={me.title}
|
title={me.title}
|
||||||
// See comment above about `sharedGroupNames`.
|
// See comment above about `sharedGroupNames`.
|
||||||
sharedGroupNames={[]}
|
sharedGroupNames={[]}
|
||||||
size={AvatarSize.EIGHTY}
|
size={AvatarSize.FORTY}
|
||||||
/>
|
/>
|
||||||
</CallBackgroundBlur>
|
</CallBackgroundBlur>
|
||||||
);
|
);
|
||||||
|
@ -520,13 +504,16 @@ export function CallScreen({
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{isRinging && (
|
{isRinging && (
|
||||||
<CallingPreCallInfo
|
<>
|
||||||
conversation={conversation}
|
<div className="module-CallingPreCallInfo-spacer " />
|
||||||
groupMembers={groupMembers}
|
<CallingPreCallInfo
|
||||||
i18n={i18n}
|
conversation={conversation}
|
||||||
me={me}
|
groupMembers={groupMembers}
|
||||||
ringMode={RingMode.IsRinging}
|
i18n={i18n}
|
||||||
/>
|
me={me}
|
||||||
|
ringMode={RingMode.IsRinging}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
{remoteParticipantsElement}
|
{remoteParticipantsElement}
|
||||||
{lonelyInCallNode}
|
{lonelyInCallNode}
|
||||||
|
@ -594,7 +581,14 @@ export function CallScreen({
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="module-ongoing-call__footer__local-preview">
|
<div
|
||||||
|
className={classNames(
|
||||||
|
'module-ongoing-call__footer__local-preview',
|
||||||
|
`module-ongoing-call__footer__local-preview--${
|
||||||
|
localPreviewNode ? 'active' : 'inactive'
|
||||||
|
}`
|
||||||
|
)}
|
||||||
|
>
|
||||||
{localPreviewNode}
|
{localPreviewNode}
|
||||||
<CallingAudioIndicator
|
<CallingAudioIndicator
|
||||||
hasAudio={hasLocalAudio}
|
hasAudio={hasLocalAudio}
|
||||||
|
|
|
@ -255,6 +255,7 @@ export function CallingLobby({
|
||||||
onCancel={onCallCanceled}
|
onCancel={onCallCanceled}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<div className="module-calling__spacer module-CallingPreCallInfo-spacer" />
|
||||||
<CallingPreCallInfo
|
<CallingPreCallInfo
|
||||||
conversation={conversation}
|
conversation={conversation}
|
||||||
groupMembers={groupMembers}
|
groupMembers={groupMembers}
|
||||||
|
@ -267,7 +268,7 @@ export function CallingLobby({
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
'module-CallingLobby__camera-is-off',
|
'module-calling__camera-is-off module-CallingLobby__camera-is-off',
|
||||||
`module-CallingLobby__camera-is-off--${
|
`module-CallingLobby__camera-is-off--${
|
||||||
shouldShowLocalVideo ? 'invisible' : 'visible'
|
shouldShowLocalVideo ? 'invisible' : 'visible'
|
||||||
}`
|
}`
|
||||||
|
@ -276,6 +277,8 @@ export function CallingLobby({
|
||||||
{i18n('icu:calling__your-video-is-off')}
|
{i18n('icu:calling__your-video-is-off')}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="module-calling__spacer module-CallingLobby__CallControls-spacer" />
|
||||||
|
|
||||||
<div className="CallControls">
|
<div className="CallControls">
|
||||||
<div className="CallControls__InfoDisplay">
|
<div className="CallControls__InfoDisplay">
|
||||||
<div className="CallControls__CallTitle">{conversation.title}</div>
|
<div className="CallControls__CallTitle">{conversation.title}</div>
|
||||||
|
|
|
@ -184,7 +184,7 @@ export function CallingPreCallInfo({
|
||||||
phoneNumber={conversation.phoneNumber}
|
phoneNumber={conversation.phoneNumber}
|
||||||
profileName={conversation.profileName}
|
profileName={conversation.profileName}
|
||||||
sharedGroupNames={conversation.sharedGroupNames}
|
sharedGroupNames={conversation.sharedGroupNames}
|
||||||
size={AvatarSize.EIGHTY}
|
size={AvatarSize.NINETY_SIX}
|
||||||
title={conversation.title}
|
title={conversation.title}
|
||||||
unblurredAvatarPath={conversation.unblurredAvatarPath}
|
unblurredAvatarPath={conversation.unblurredAvatarPath}
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
|
|
Loading…
Reference in a new issue