ultimatepos/Modules/Communication/Resources/views/meetings/room.blade.php

263 lines
8.4 KiB
PHP

<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}"
dir="{{ in_array(session()->get('user.language', config('app.locale')), config('constants.langs_rtl')) ? 'rtl' : 'ltr' }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ $meeting->title }} - @lang('communication::lang.meetings')</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #0f1419;
color: #fff;
height: 100vh;
overflow: hidden;
display: flex;
flex-direction: column;
}
.room-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 14px 20px;
background: rgba(0,0,0,0.45);
border-bottom: 1px solid rgba(255,255,255,0.08);
flex-shrink: 0;
}
.room-title { font-size: 16px; font-weight: 600; }
.room-status {
font-size: 12px;
color: #8fa3b8;
margin-top: 2px;
}
.room-status.connected { color: #2ecc71; }
.room-status.warning { color: #f39c12; }
.room-main {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding: 16px;
overflow: hidden;
position: relative;
}
#video-grid {
display: grid;
gap: 12px;
width: 100%;
height: 100%;
max-height: calc(100vh - 140px);
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
align-content: center;
}
.video-tile {
position: relative;
background: #1a2332;
border-radius: 12px;
overflow: hidden;
aspect-ratio: 16/9;
min-height: 180px;
}
.video-tile video {
width: 100%;
height: 100%;
object-fit: cover;
background: #1a2332;
}
.video-tile audio { display: none; }
.video-tile .tile-label {
position: absolute;
bottom: 10px;
left: 10px;
background: rgba(0,0,0,0.6);
padding: 4px 10px;
border-radius: 6px;
font-size: 12px;
font-weight: 600;
z-index: 2;
}
.video-tile .tile-caption {
position: absolute;
bottom: 42px;
left: 10px;
right: 10px;
background: rgba(0,0,0,0.72);
padding: 8px 12px;
border-radius: 8px;
font-size: 13px;
line-height: 1.5;
color: #fff;
display: none;
z-index: 2;
}
.video-tile .tile-caption.visible { display: block; }
.prejoin-toggle-row {
display: flex;
flex-direction: column;
gap: 4px;
}
.toggle-label {
display: flex;
align-items: center;
gap: 8px;
font-size: 13px;
color: #e8edf3;
cursor: pointer;
}
.toggle-hint {
font-size: 11px;
color: #8fa3b8;
line-height: 1.4;
}
.toolbar-btn.captions { background: #2a3544; color: #fff; }
.toolbar-btn.captions.off { background: #555; }
.video-tile.local { border: 2px solid #4f7cff; }
.room-overlay {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 14px;
background: rgba(15,20,25,0.92);
z-index: 10;
padding: 20px;
}
.room-overlay i.main-icon { font-size: 36px; color: #4f7cff; }
.room-overlay.error i.main-icon { color: #e74c3c; }
.room-overlay p { color: #b8c5d3; font-size: 14px; max-width: 420px; text-align: center; line-height: 1.6; }
.prejoin-panel {
width: 100%;
max-width: 520px;
display: flex;
flex-direction: column;
gap: 14px;
align-items: center;
}
.prejoin-panel h2 { font-size: 18px; font-weight: 600; text-align: center; }
.prejoin-preview-wrap {
position: relative;
width: 100%;
aspect-ratio: 16/9;
background: #1a2332;
border-radius: 14px;
overflow: hidden;
border: 2px solid rgba(79, 124, 255, 0.35);
}
.prejoin-preview-wrap video {
width: 100%;
height: 100%;
object-fit: cover;
background: #1a2332;
}
.prejoin-no-video {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
gap: 10px;
color: #8fa3b8;
font-size: 13px;
text-align: center;
padding: 16px;
}
.prejoin-devices { width: 100%; display: grid; gap: 10px; }
.prejoin-devices label { display: block; font-size: 12px; color: #8fa3b8; margin-bottom: 4px; }
.prejoin-devices select {
width: 100%;
padding: 9px 12px;
border-radius: 10px;
border: 1px solid #2a3544;
background: #1a2332;
color: #fff;
font-size: 13px;
}
.prejoin-actions {
display: flex;
gap: 10px;
flex-wrap: wrap;
justify-content: center;
align-items: center;
}
.room-toolbar {
display: flex;
align-items: center;
justify-content: center;
gap: 14px;
padding: 16px 20px 22px;
background: rgba(0,0,0,0.45);
border-top: 1px solid rgba(255,255,255,0.08);
flex-shrink: 0;
}
.toolbar-btn {
width: 52px;
height: 52px;
border-radius: 50%;
border: none;
cursor: pointer;
font-size: 18px;
display: inline-flex;
align-items: center;
justify-content: center;
transition: background 0.2s, transform 0.15s;
}
.toolbar-btn:hover { transform: scale(1.05); }
.toolbar-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.toolbar-btn.mic, .toolbar-btn.cam { background: #2a3544; color: #fff; }
.toolbar-btn.mic.off, .toolbar-btn.cam.off { background: #c0392b; }
.toolbar-btn.leave {
background: #c0392b;
color: #fff;
width: auto;
border-radius: 26px;
padding: 0 22px;
font-size: 14px;
font-weight: 600;
gap: 8px;
}
.overlay-back, .btn-join {
border: none;
border-radius: 10px;
padding: 11px 22px;
background: #4f7cff;
color: #fff;
font-weight: 600;
cursor: pointer;
font-size: 14px;
}
.prejoin-hint { font-size: 12px; color: #f39c12; text-align: center; min-height: 18px; }
#comm-meeting-room-app { display: contents; }
</style>
</head>
<body>
<header class="room-header">
<div>
<div class="room-title">{{ $meeting->title }}</div>
<div class="room-status" id="room-status">@lang('communication::lang.prejoin_title')</div>
</div>
</header>
<div id="comm-meeting-room-app"></div>
@php
$commBootExtra = [
'meetingId' => $meeting->id,
'routes' => [
'meetings' => [
'index' => url('communication/meetings'),
'token' => url("communication/meetings/{$meeting->id}/token"),
],
],
];
@endphp
@include('communication::layouts.boot')
@include('communication::layouts.vite', ['entry' => 'Resources/js/meeting-room.js'])
</body>
</html>