mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-02 19:49:23 +00:00
add indicator when to-device is used.
This commit is contained in:
@@ -22,6 +22,10 @@ import Logo from "./icons/Logo.svg?react";
|
|||||||
import { Avatar, Size } from "./Avatar";
|
import { Avatar, Size } from "./Avatar";
|
||||||
import { EncryptionLock } from "./room/EncryptionLock";
|
import { EncryptionLock } from "./room/EncryptionLock";
|
||||||
import { useMediaQuery } from "./useMediaQuery";
|
import { useMediaQuery } from "./useMediaQuery";
|
||||||
|
import {
|
||||||
|
useExperimentalToDeviceTransportSetting,
|
||||||
|
useSetting,
|
||||||
|
} from "./settings/settings";
|
||||||
|
|
||||||
interface HeaderProps extends HTMLAttributes<HTMLElement> {
|
interface HeaderProps extends HTMLAttributes<HTMLElement> {
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
@@ -133,7 +137,9 @@ export const RoomHeaderInfo: FC<RoomHeaderInfoProps> = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const size = useMediaQuery("(max-width: 550px)") ? "sm" : "lg";
|
const size = useMediaQuery("(max-width: 550px)") ? "sm" : "lg";
|
||||||
|
const [toDeviceEncryption] = useSetting(
|
||||||
|
useExperimentalToDeviceTransportSetting,
|
||||||
|
);
|
||||||
return (
|
return (
|
||||||
<div className={styles.roomHeaderInfo} data-size={size}>
|
<div className={styles.roomHeaderInfo} data-size={size}>
|
||||||
<Avatar
|
<Avatar
|
||||||
@@ -153,6 +159,11 @@ export const RoomHeaderInfo: FC<RoomHeaderInfoProps> = ({
|
|||||||
{name}
|
{name}
|
||||||
</Heading>
|
</Heading>
|
||||||
<EncryptionLock encrypted={encrypted} />
|
<EncryptionLock encrypted={encrypted} />
|
||||||
|
{
|
||||||
|
// TODO: remove this once we remove the developer flag
|
||||||
|
// and find a better way to device what key transport to use.
|
||||||
|
toDeviceEncryption && <Text size="sm">To Device key transport</Text>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
{(participantCount ?? 0) > 0 && (
|
{(participantCount ?? 0) > 0 && (
|
||||||
<div className={styles.participantsLine}>
|
<div className={styles.participantsLine}>
|
||||||
|
|||||||
Reference in New Issue
Block a user