mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-05 19:59:20 +00:00
Hide back & hangup buttons when ?embed query param is passed
This commit is contained in:
@@ -80,6 +80,14 @@ export function RoomHeaderInfo({ roomName, avatarUrl }) {
|
|||||||
export function RoomSetupHeaderInfo({ roomName, avatarUrl, ...rest }) {
|
export function RoomSetupHeaderInfo({ roomName, avatarUrl, ...rest }) {
|
||||||
const ref = useRef();
|
const ref = useRef();
|
||||||
const { buttonProps } = useButton(rest, ref);
|
const { buttonProps } = useButton(rest, ref);
|
||||||
|
const isEmbedded = window.location.search.includes("embed");
|
||||||
|
if (isEmbedded) {
|
||||||
|
return (
|
||||||
|
<div className={styles.backButton} ref={ref} {...buttonProps}>
|
||||||
|
<RoomHeaderInfo roomName={roomName} avatarUrl={avatarUrl} />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<button className={styles.backButton} ref={ref} {...buttonProps}>
|
<button className={styles.backButton} ref={ref} {...buttonProps}>
|
||||||
<ArrowLeftIcon width={16} height={16} />
|
<ArrowLeftIcon width={16} height={16} />
|
||||||
|
|||||||
@@ -158,6 +158,7 @@ export const PTTCallView: React.FC<Props> = ({
|
|||||||
? activeSpeakerUser.displayName
|
? activeSpeakerUser.displayName
|
||||||
: "";
|
: "";
|
||||||
|
|
||||||
|
const isEmbedded = window.location.search.includes("embed");
|
||||||
return (
|
return (
|
||||||
<div className={styles.pttCallView} ref={containerRef}>
|
<div className={styles.pttCallView} ref={containerRef}>
|
||||||
<PTTClips
|
<PTTClips
|
||||||
@@ -206,7 +207,7 @@ export const PTTCallView: React.FC<Props> = ({
|
|||||||
feedbackModalState={feedbackModalState}
|
feedbackModalState={feedbackModalState}
|
||||||
feedbackModalProps={feedbackModalProps}
|
feedbackModalProps={feedbackModalProps}
|
||||||
/>
|
/>
|
||||||
<HangupButton onPress={onLeave} />
|
{!isEmbedded && <HangupButton onPress={onLeave} />}
|
||||||
<InviteButton onPress={() => inviteModalState.open()} />
|
<InviteButton onPress={() => inviteModalState.open()} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user