Add shield icon when messaging in an encrypted room

This commit is contained in:
anavoi 2025-08-21 22:53:24 +02:00
commit 180111a02e

View file

@ -580,6 +580,18 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
) )
} }
before={ before={
room.hasEncryptionStateEvent() ?
[
<IconButton
onClick={() => pickFile('*')}
variant="SurfaceVariant"
size="300"
radii="300"
>
<Icon src={Icons.PlusCircle} />
</IconButton>,
<Icon src={Icons.ShieldLock} />,
] : (
< IconButton < IconButton
onClick={() => pickFile('*')} onClick={() => pickFile('*')}
variant="SurfaceVariant" variant="SurfaceVariant"
@ -588,6 +600,7 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
> >
<Icon src={Icons.PlusCircle} /> <Icon src={Icons.PlusCircle} />
</IconButton> </IconButton>
)
} }
after={ after={
<> <>