mirror of https://github.com/OpenVidu/openvidu.git
ov-components: improve prejoin component and enhance SCSS styles for better layout and responsiveness
parent
0f06c15a78
commit
1b9396ca1b
|
@ -3,9 +3,12 @@
|
||||||
} @else {
|
} @else {
|
||||||
<div class="prejoin-container" id="prejoin-container" [class.mobile]="viewportService.isMobile()" [class.name-error]="!!_error">
|
<div class="prejoin-container" id="prejoin-container" [class.mobile]="viewportService.isMobile()" [class.name-error]="!!_error">
|
||||||
<!-- Top Language Toolbar -->
|
<!-- Top Language Toolbar -->
|
||||||
<div class="top-toolbar" *ngIf="!isMinimal">
|
@if (!isMinimal) {
|
||||||
<ov-lang-selector [compact]="false" class="language-selector" (onLangChanged)="onLangChanged.emit($event)"> </ov-lang-selector>
|
<div class="top-toolbar">
|
||||||
|
<ov-lang-selector [compact]="false" class="language-selector" (onLangChanged)="onLangChanged.emit($event)">
|
||||||
|
</ov-lang-selector>
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
<!-- Loading State -->
|
<!-- Loading State -->
|
||||||
@if (isLoading) {
|
@if (isLoading) {
|
||||||
|
|
|
@ -21,13 +21,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.prejoin-content {
|
.prejoin-content {
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
max-width: 520px;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
.prejoin-main {
|
.prejoin-main {
|
||||||
max-width: 480px;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
background: var(--ov-surface-color, #ffffff);
|
||||||
|
border-radius: var(--ov-surface-radius);
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
|
||||||
|
animation: fadeIn 0.3s ease-out;
|
||||||
|
transform: translateZ(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,23 +80,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Main Content
|
|
||||||
.prejoin-main {
|
|
||||||
width: 100%;
|
|
||||||
max-width: 520px;
|
|
||||||
max-height: 544px;
|
|
||||||
background: var(--ov-surface-color, #ffffff);
|
|
||||||
border-radius: var(--ov-surface-radius);
|
|
||||||
overflow: hidden;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
|
|
||||||
animation: fadeIn 0.3s ease-out;
|
|
||||||
transform: translateZ(0);
|
|
||||||
|
|
||||||
// Video Preview Section
|
// Video Preview Section
|
||||||
.video-preview-section {
|
.video-preview-section {
|
||||||
padding: 0;
|
|
||||||
.video-preview-container {
|
.video-preview-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -99,6 +89,7 @@
|
||||||
border-radius: var(--ov-surface-radius) var(--ov-surface-radius) 0 0;
|
border-radius: var(--ov-surface-radius) var(--ov-surface-radius) 0 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: var(--ov-video-background);
|
background: var(--ov-video-background);
|
||||||
|
|
||||||
.video-frame {
|
.video-frame {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -181,10 +172,10 @@
|
||||||
|
|
||||||
// Configuration Section
|
// Configuration Section
|
||||||
.configuration-section {
|
.configuration-section {
|
||||||
padding: 24px 24px 24px; // Added top padding since video has no padding
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
padding: 24px;
|
||||||
gap: 20px;
|
gap: 10px;
|
||||||
|
flex-flow: column;
|
||||||
|
|
||||||
.input-section {
|
.input-section {
|
||||||
::ng-deep .name-input {
|
::ng-deep .name-input {
|
||||||
|
@ -291,39 +282,56 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
// Mobile Layout Optimization
|
||||||
.prejoin-container.mobile {
|
.prejoin-container.mobile {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
.prejoin-main {
|
align-items: stretch;
|
||||||
|
|
||||||
|
.prejoin-content {
|
||||||
max-width: none;
|
max-width: none;
|
||||||
|
height: 100vh;
|
||||||
|
|
||||||
|
.prejoin-main {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
max-height: none;
|
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.configuration-section {
|
|
||||||
padding: 20px 10px;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 18px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.video-preview-section {
|
.video-preview-section {
|
||||||
|
// Video section takes remaining space after configuration
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 50vh;
|
min-height: 0; // Allow flexbox to shrink
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
.video-preview-container {
|
.video-preview-container {
|
||||||
flex: 1;
|
width: 100%;
|
||||||
height: 75vh;
|
height: 100%;
|
||||||
aspect-ratio: unset;
|
aspect-ratio: unset;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.configuration-section {
|
||||||
|
// Configuration section adapts to content
|
||||||
|
flex: 0 0 auto;
|
||||||
|
padding: 16px;
|
||||||
|
gap: 16px;
|
||||||
|
|
||||||
|
// Ensure minimum usable space but allow growth
|
||||||
|
min-height: fit-content;
|
||||||
|
max-height: 40vh; // Prevent taking too much space
|
||||||
|
overflow-y: auto; // Scroll if content is too tall
|
||||||
|
}
|
||||||
|
|
||||||
|
.vb-container {
|
||||||
|
// Virtual background panel also adapts to content
|
||||||
|
flex: 0 0 auto;
|
||||||
|
max-height: 40vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes slideInFromRight {
|
@keyframes slideInFromRight {
|
||||||
|
@ -337,28 +345,21 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Responsive Design
|
// Responsive Design for Desktop/Tablet
|
||||||
@media (max-width: 640px) {
|
@media (max-width: 640px) and (min-height: 640px) {
|
||||||
.prejoin-container {
|
.prejoin-container:not(.mobile) {
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
min-height: 100vh;
|
|
||||||
}
|
.prejoin-content {
|
||||||
|
max-width: 100%;
|
||||||
|
|
||||||
.prejoin-main {
|
.prejoin-main {
|
||||||
max-width: 100%;
|
|
||||||
border-radius: var(--ov-surface-radius);
|
border-radius: var(--ov-surface-radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-preview-section {
|
|
||||||
padding: 0px 0px 12px;
|
|
||||||
|
|
||||||
.video-preview-container {
|
|
||||||
aspect-ratio: 4/3;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.configuration-section {
|
.configuration-section {
|
||||||
padding: 0 20px 20px;
|
padding: 20px;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -366,14 +367,14 @@
|
||||||
padding: 16px 20px;
|
padding: 16px 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 480px) {
|
|
||||||
.prejoin-container {
|
|
||||||
padding: 12px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 480px) and (min-height: 640px) {
|
||||||
|
.prejoin-container:not(.mobile) {
|
||||||
|
padding: 12px;
|
||||||
|
|
||||||
.configuration-section {
|
.configuration-section {
|
||||||
padding: 0 16px 16px;
|
padding: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-overlay .device-controls {
|
.video-overlay .device-controls {
|
||||||
|
@ -393,15 +394,17 @@
|
||||||
padding: 12px 16px;
|
padding: 12px 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-height: 640px) {
|
|
||||||
.prejoin-container {
|
|
||||||
align-items: flex-start;
|
|
||||||
padding-top: 60px; // Add space for top toolbar
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Short screens - optimize for horizontal space
|
||||||
|
@media (max-height: 640px) and (min-width: 640px) {
|
||||||
|
.prejoin-container:not(.mobile) {
|
||||||
|
align-items: flex-start;
|
||||||
|
padding-top: 60px; // Space for top toolbar
|
||||||
|
|
||||||
.video-preview-section .video-preview-container {
|
.video-preview-section .video-preview-container {
|
||||||
aspect-ratio: 4/3; // Keep the taller aspect ratio even on small screens
|
aspect-ratio: 16/9; // Wider aspect ratio for short screens
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue