mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-13 18:50:29 +03:00
adjust room header for calling
This commit is contained in:
parent
4403eacdf1
commit
7712e34d22
1 changed files with 35 additions and 22 deletions
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable no-nested-ternary */
|
||||
import React, { useCallback } from 'react';
|
||||
import { Box, Line } from 'folds';
|
||||
import { useParams } from 'react-router-dom';
|
||||
|
|
@ -15,6 +16,7 @@ import { useMatrixClient } from '../../hooks/useMatrixClient';
|
|||
import { useRoomMembers } from '../../hooks/useRoomMembers';
|
||||
import { CallView } from '../call/CallView';
|
||||
import { useCallState } from '../../pages/client/call/CallProvider';
|
||||
import { RoomViewHeader } from './RoomViewHeader';
|
||||
|
||||
export function Room() {
|
||||
const { eventId } = useParams();
|
||||
|
|
@ -42,6 +44,16 @@ export function Room() {
|
|||
|
||||
return (
|
||||
<PowerLevelsContextProvider value={powerLevels}>
|
||||
<Box
|
||||
grow="Yes"
|
||||
style={{
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
}}
|
||||
>
|
||||
{room.isCallRoom() && <RoomViewHeader />}
|
||||
<Box
|
||||
grow="Yes"
|
||||
style={{
|
||||
|
|
@ -51,7 +63,7 @@ export function Room() {
|
|||
flexDirection: 'row',
|
||||
}}
|
||||
>
|
||||
<CallView room={room} eventId={eventId} />
|
||||
<CallView room={room} />
|
||||
{(!room.isCallRoom() || isChatOpen) && (
|
||||
<Box
|
||||
grow="Yes"
|
||||
|
|
@ -74,6 +86,7 @@ export function Room() {
|
|||
</>
|
||||
)}
|
||||
</Box>
|
||||
</Box>
|
||||
</PowerLevelsContextProvider>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue