Separate fullscreen and pip call header css
This commit is contained in:
parent
7bf7f23a5e
commit
636e9ad6ef
3 changed files with 13 additions and 8 deletions
|
@ -13,7 +13,7 @@ import Button from '../../atoms/button/Button';
|
||||||
|
|
||||||
const TOPIC_JITSI_CALL = 'd38dd491fefa1cfffc27f9c57f2bdb4a'
|
const TOPIC_JITSI_CALL = 'd38dd491fefa1cfffc27f9c57f2bdb4a'
|
||||||
|
|
||||||
function JitsiRoom({ setIsJitsiRoom }) {
|
function JitsiRoom({ isJitsiRoom, setIsJitsiRoom }) {
|
||||||
const [jitsiCallId, setJitsiCallId] = useState(null);
|
const [jitsiCallId, setJitsiCallId] = useState(null);
|
||||||
|
|
||||||
const [roomInfo, setRoomInfo] = useState({
|
const [roomInfo, setRoomInfo] = useState({
|
||||||
|
@ -30,7 +30,9 @@ function JitsiRoom({ setIsJitsiRoom }) {
|
||||||
const handleRoomSelected = (rId, pRoomId, eId) => {
|
const handleRoomSelected = (rId, pRoomId, eId) => {
|
||||||
roomInfo.roomTimeline?.removeInternalListeners();
|
roomInfo.roomTimeline?.removeInternalListeners();
|
||||||
const roomTimeline = new RoomTimeline(rId);
|
const roomTimeline = new RoomTimeline(rId);
|
||||||
const topic = roomTimeline.room.currentState.getStateEvents('m.room.topic')[0]?.getContent().topic
|
const topic = roomTimeline.room.currentState
|
||||||
|
.getStateEvents('m.room.topic')[0]
|
||||||
|
?.getContent().topic;
|
||||||
|
|
||||||
if (mx.getRoom(rId) && topic === TOPIC_JITSI_CALL && jitsiCallId !== rId) {
|
if (mx.getRoom(rId) && topic === TOPIC_JITSI_CALL && jitsiCallId !== rId) {
|
||||||
if (confirm('Do you want to join this call?')) {
|
if (confirm('Do you want to join this call?')) {
|
||||||
|
@ -49,7 +51,7 @@ function JitsiRoom({ setIsJitsiRoom }) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setIsJitsiRoom(topic === TOPIC_JITSI_CALL)
|
setIsJitsiRoom(topic === TOPIC_JITSI_CALL);
|
||||||
};
|
};
|
||||||
|
|
||||||
navigation.on(cons.events.navigation.ROOM_SELECTED, handleRoomSelected);
|
navigation.on(cons.events.navigation.ROOM_SELECTED, handleRoomSelected);
|
||||||
|
@ -67,7 +69,7 @@ function JitsiRoom({ setIsJitsiRoom }) {
|
||||||
if (jitsiCallId) {
|
if (jitsiCallId) {
|
||||||
return (
|
return (
|
||||||
<div className="call">
|
<div className="call">
|
||||||
<div className="call_header" id="header" ref={openerRef}>
|
<div className={isJitsiRoom ? 'call_header' : 'call_header pip_header'} ref={openerRef}>
|
||||||
{roomName}
|
{roomName}
|
||||||
</div>
|
</div>
|
||||||
<div className="call_iframe">
|
<div className="call_iframe">
|
||||||
|
|
|
@ -15,13 +15,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.call_header {
|
.call_header {
|
||||||
z-index: 2001;
|
|
||||||
cursor: move;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pip_header {
|
||||||
|
z-index: 2001;
|
||||||
|
cursor: move;
|
||||||
|
}
|
||||||
|
|
||||||
.call_buttons {
|
.call_buttons {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0.15rem;
|
top: 0.15rem;
|
||||||
|
|
|
@ -177,7 +177,7 @@ function Client() {
|
||||||
<Navigation />
|
<Navigation />
|
||||||
</div>
|
</div>
|
||||||
<div className={isJitsiRoom ? ROOM_CLASS : JITSI_ROOM_CLASS}>
|
<div className={isJitsiRoom ? ROOM_CLASS : JITSI_ROOM_CLASS}>
|
||||||
<JitsiRoom setIsJitsiRoom={setIsJitsiRoom} />
|
<JitsiRoom isJitsiRoom={isJitsiRoom} setIsJitsiRoom={setIsJitsiRoom} />
|
||||||
</div>
|
</div>
|
||||||
<div className={isJitsiRoom ? 'hidden' : ROOM_CLASS} ref={roomWrapperRef}>
|
<div className={isJitsiRoom ? 'hidden' : ROOM_CLASS} ref={roomWrapperRef}>
|
||||||
<Room isJitsiRoom={isJitsiRoom} />
|
<Room isJitsiRoom={isJitsiRoom} />
|
||||||
|
|
Loading…
Reference in a new issue