diff --git a/client/src/components/DraggableContainer.tsx b/client/src/components/DraggableContainer.tsx index 4ebaf42..73d2473 100644 --- a/client/src/components/DraggableContainer.tsx +++ b/client/src/components/DraggableContainer.tsx @@ -496,7 +496,7 @@ export default function DraggableContainer({ // Если компонент отключен, просто рендерим children без стилей и логики if (!enabled) { - return
{children}
; + return <>{children}; } return ( @@ -505,7 +505,9 @@ export default function DraggableContainer({ className={clsx( "pointer-events-auto", // draggable && "touch-none", - !isDragging && enableSnapping && "transition-[inset] duration-500 ease-out", + !isDragging && + enableSnapping && + "transition-[inset] duration-500 ease-out", draggable && !dragHandleRef && (isDragging ? "cursor-grabbing" : "cursor-grab"), diff --git a/client/src/components/SessionUsersPanel.tsx b/client/src/components/SessionUsersPanel.tsx index ad8fae2..323ce98 100644 --- a/client/src/components/SessionUsersPanel.tsx +++ b/client/src/components/SessionUsersPanel.tsx @@ -157,108 +157,93 @@ function SessionUsersPanel({ windowDimensions.width >= 640 ? "bottom-right" : "top-right" } padding="1.111vw" - className={clsx( - "z-[100] 2xl:gap-[0.556vw] gap-2", - mode === "mini" - ? "flex" - : `2xl:p-[5vw] p-4 w-full 2xl:h-dvh max-2xl:portrait:max-h-[calc(100dvh-17.778vw)] max-2xl:landscape:max-h-[calc(100dvh-8.75vw)] grid grid-cols-${gridColumns} relative bg-black` - )} + // className={clsx( + // "z-[100] 2xl:gap-[0.556vw] gap-2", + // mode === "mini" + // ? "flex" + // : `2xl:p-[5vw] p-4 w-full 2xl:h-dvh max-2xl:portrait:max-h-[calc(100dvh-17.778vw)] max-2xl:landscape:max-h-[calc(100dvh-8.75vw)] grid grid-cols-${gridColumns} relative bg-black` + // )} > - {localStream && - Array.from({ length: LOCAL_CAMERAS_COUNT }).map((_, index) => ( - console.log("Toggle control")} - onSpeakingChange={handleSpeakingChange} - className={clsx( - mode === "full" && activeCamerasCount <= 2 - ? "m-auto" - : activeCamerasCount > 12 - ? "!aspect-square w-full" - : "w-full" - )} - /> - ))} - - {/* Камеры удаленных участников - показываем только если есть поток с активными треками */} - {participants - .filter( - (participant) => - participant.stream != null && - participant.stream.getTracks().length > 0 - ) - .map((participant) => ( - + {localStream && + Array.from({ length: LOCAL_CAMERAS_COUNT }).map((_, index) => ( + console.log("Toggle control")} + onSpeakingChange={handleSpeakingChange} + className={clsx( + mode === "full" && activeCamerasCount <= 2 ? "m-auto" : activeCamerasCount > 12 ? "!aspect-square w-full" - : "w-full") - )} - key={participant.id} - mode={mode} - name={participant.id} - isMuted={participant.isMuted || false} - isVideoOff={participant.isVideoOff || false} - isSpeaking={participant.isSpeaking} - isControlDisabled={true} - isAdmin={true} - mediaStream={participant.stream} - hasLocalMediaPermission={hasLocalStream} - onMute={() => console.log(`Mute user ${participant.id}`)} - onVideoOff={() => console.log(`Video off user ${participant.id}`)} - onCanControl={() => - console.log(`Can control user ${participant.id}`) - } - /> - ))} + : "w-full" + )} + /> + ))} - + {/* Камеры удаленных участников - показываем только если есть поток с активными треками */} + {participants + .filter( + (participant) => + participant.stream != null && + participant.stream.getTracks().length > 0 + ) + .map((participant) => ( + 12 + ? "!aspect-square w-full" + : "w-full") + )} + key={participant.id} + mode={mode} + name={participant.id} + isMuted={participant.isMuted || false} + isVideoOff={participant.isVideoOff || false} + isSpeaking={participant.isSpeaking} + isControlDisabled={true} + isAdmin={true} + mediaStream={participant.stream} + hasLocalMediaPermission={hasLocalStream} + onMute={() => console.log(`Mute user ${participant.id}`)} + onVideoOff={() => console.log(`Video off user ${participant.id}`)} + onCanControl={() => + console.log(`Can control user ${participant.id}`) + } + /> + ))} + + + ); - // } - - // Для режима mini используем flex-обертку для центрирования и внутри grid - // return ( - //
- //
- // {camerasContent} - //
- //
- // ); } export default SessionUsersPanel; diff --git a/client/src/pages/SessionPage.tsx b/client/src/pages/SessionPage.tsx index d4f4460..3e3d76a 100644 --- a/client/src/pages/SessionPage.tsx +++ b/client/src/pages/SessionPage.tsx @@ -160,8 +160,7 @@ function SessionPage() { return (
{/* Pixel Streaming - показывается только когда сессия активна */}