TelegramPWA/src/components/calls/group/GroupCall.module.scss
2023-07-06 09:57:57 +02:00

301 lines
5.4 KiB
SCSS

.root {
--group-call-panel-color: #212121;
--group-call-panel-header-border-color: #3b3b3b;
--color-dividers: var(--group-call-panel-header-border-color);
--group-call-background-color: #000000;
--green-button-color: rgba(1, 200, 80, 0.3);
--blue-button-color: rgb(60, 135, 247, 0.2);
--purple-button-color: rgb(61, 82, 223, 0.2);
--gradient-blue: linear-gradient(225deg, #4EABF8 14.73%, #3478F6 85.27%);
--gradient-green: linear-gradient(230.46deg, #00A3B4 12.94%, #00CB47 86.29%);
--gradient-purple: linear-gradient(230.46deg, #CE4D74 0%, #3D52DF 100%);
--gradient-speaking: linear-gradient(135deg, #5CC85C 0%, #48A1B3 101.27%);
--red-button-color: rgba(255, 89, 90, 0.3);
--disabled-button-color: #333333;
--color-text-secondary: #AAAAAA;
--color-text: #FFFFFF;
--default-width: 26.25rem;
--max-height: 40rem;
color: var(--color-text);
:global {
.modal-dialog {
max-width: var(--default-width);
max-height: min(var(--max-height), 100vh);
height: 100%;
min-height: min(80vh, var(--max-height));
overflow: hidden;
background: var(--group-call-background-color);
}
.modal-content {
min-height: 100%;
display: flex;
padding: 0;
}
}
}
.panelWrapper {
max-width: var(--default-width);
width: 100%;
}
.panel {
background: var(--group-call-panel-color);
display: flex;
flex-direction: column;
height: 100%;
overflow: auto;
position: relative;
}
.panelScrollTrigger {
position: absolute;
top: 0;
width: 100%;
}
.panelHeader {
display: flex;
align-items: center;
position: sticky;
top: 0;
border-bottom: 0.0625rem solid transparent;
padding: 0.375rem 0.875rem;
user-select: none;
z-index: 1;
background: var(--group-call-panel-color);
transition: 0.25s ease-in-out border-bottom-color;
&.scrolled {
border-bottom-color: var(--group-call-panel-header-border-color);
}
}
.headerButton {
color: var(--color-text) !important;
}
.firstButton {
margin-right: 1.375rem;
}
.lastButton {
margin-left: auto;
}
.panelHeaderText {
display: flex;
flex-direction: column;
justify-content: center;
overflow: hidden;
}
.title {
line-height: 1.375rem;
white-space: pre;
overflow: hidden;
text-overflow: ellipsis;
unicode-bidi: plaintext;
font-size: 1rem;
font-weight: 500;
margin: 0;
}
.bigger {
font-size: 1.25rem;
}
.subtitle {
font-size: 0.875rem;
line-height: 1.125rem;
margin: 0;
color: var(--color-text-secondary);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
display: inline-block;
}
.participants {
position: relative;
margin: 0.125rem 0.5rem 0;
}
.participantVideos {
width: 100%;
position: relative;
}
.addParticipantButton {
position: fixed;
}
.videos {
display: flex;
flex-direction: column;
width: calc(100% - var(--default-width));
}
.mainVideoContainer {
position: absolute;
}
.videosHeader {
display: flex;
align-items: center;
padding: 0.375rem 0.875rem;
}
.videosHeaderLastButton {
margin-left: auto;
}
.videosContent {
flex-grow: 1;
margin: 0.1875rem 0.625rem 0.5rem;
}
.actions {
--actions-max-width: 0px;
position: absolute;
left: 50%;
transform: translateX(calc(-50% - var(--actions-max-width) / 2));
bottom: 1.75rem;
display: flex;
gap: 1.25rem;
z-index: 2;
}
.actionButton {
width: 3.375rem !important;
height: 3.375rem !important;
color: var(--color-text) !important;
background-color: var(--green-button-color) !important;
transition: 0.15s filter, 0.25s ease-out background-color;
backdrop-filter: blur(25px);
&:global(.disabled) {
background: var(--disabled-button-color) !important;
}
&:hover {
filter: brightness(1.1);
}
}
.destructive {
background: var(--red-button-color) !important;
}
.canRequestToSpeak {
background: var(--purple-button-color) !important;
}
.muted {
background: var(--blue-button-color) !important;
}
.fullscreen {
:global {
.modal-dialog {
min-width: 100%;
min-height: 100%;
border-radius: 0;
}
.modal-content {
max-height: initial;
}
}
&.portrait .panelWrapper {
max-width: 100%;
}
}
.landscape {
.panelWrapper {
position: absolute;
right: 0;
top: 0;
bottom: 0;
transform: translateZ(0);
}
&:not(.noVideoParticipants) {
.actions {
--actions-max-width: var(--default-width);
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(50px);
border-radius: 1.25rem;
padding: 0.75rem;
bottom: 2.5rem;
transition: 250ms ease-in-out opacity;
opacity: 0;
}
.videos:hover ~ .actions, .mainVideoContainer:hover ~ .actions, .actions:hover {
opacity: 1;
}
}
&.noVideoParticipants {
.panelWrapper {
max-width: max(50vw, 30rem);
width: 100%;
transform: translateX(-50%);
left: 50%;
right: 0;
}
:global(.modal-content) {
background: var(--group-call-panel-color);
}
}
}
.portrait {
.panelWrapper::after {
display: block;
content: '';
position: fixed;
width: 100%;
height: 7.5rem;
left: 0;
bottom: 0;
pointer-events: none;
background: linear-gradient(180deg, rgba(33, 33, 33, 0) 0%, rgba(33, 33, 33, 0.65) 48.54%, #212121 100%);
}
}
.noSidebar {
.panelWrapper {
transform: translate3d(100%, 0, 0);
}
.videos {
width: 100%;
}
.actions {
--actions-max-width: 0px !important;
}
}