Open source video conferencing app powered by LiveKit. Built with Django and React.
✨(frontend) introduce a recording toaster
lebaudantoinefa9484b63059
diff --git a/src/frontend/src/features/rooms/livekit/components/RecordingStateToast.tsx b/src/frontend/src/features/rooms/livekit/components/RecordingStateToast.tsxnew file mode 100644index 00000000..1f3bdc3f--- /dev/null+++ b/src/frontend/src/features/rooms/livekit/components/RecordingStateToast.tsx@@ -0,0 +1,43 @@+import { css } from '@/styled-system/css'+import { RiRecordCircleLine } from '@remixicon/react'+import { Text } from '@/primitives'+import { useTranslation } from 'react-i18next'+import { useRoomContext } from '@livekit/components-react'++export const RecordingStateToast = () => {+ const { t } = useTranslation('rooms', { keyPrefix: 'recording' })++ const room = useRoomContext()++ if (!room?.isRecording) return++ return (+ <div+ className={css({+ display: 'flex',+ position: 'fixed',+ top: '10px',+ left: '10px',+ paddingY: '0.25rem',+ paddingX: '0.25rem 0.35rem',+ backgroundColor: 'primaryDark.200',+ borderColor: 'primaryDark.400',+ border: '1px solid',+ color: 'white',+ borderRadius: '4px',+ gap: '0.5rem',+ })}+ >+ <RiRecordCircleLine+ size={20}+ className={css({+ color: 'white',+ backgroundColor: 'danger.700',+ padding: '3px',+ borderRadius: '3px',+ })}+ />+ <Text variant={'sm'}>{t('label')}</Text>+ </div>+ )+}diff --git a/src/frontend/src/features/rooms/livekit/prefabs/VideoConference.tsx b/src/frontend/src/features/rooms/livekit/prefabs/VideoConference.tsxindex 25ec8745..94493cd2 100644--- a/src/frontend/src/features/rooms/livekit/prefabs/VideoConference.tsx+++ b/src/frontend/src/features/rooms/livekit/prefabs/VideoConference.tsx@@ -28,6 +28,7 @@ import { FocusLayout } from '../components/FocusLayout'import { ParticipantTile } from '../components/ParticipantTile'import { SidePanel } from '../components/SidePanel'import { useSidePanel } from '../hooks/useSidePanel'+import { RecordingStateToast } from '../components/RecordingStateToast'const LayoutWrapper = styled('div',@@ -212,6 +213,7 @@ export function VideoConference({ ...props }: VideoConferenceProps) {)}<RoomAudioRenderer /><ConnectionStateToast />+ <RecordingStateToast /></div>)}diff --git a/src/frontend/src/locales/de/rooms.json b/src/frontend/src/locales/de/rooms.jsonindex d898b402..b5fa5c89 100644--- a/src/frontend/src/locales/de/rooms.json+++ b/src/frontend/src/locales/de/rooms.json@@ -164,5 +164,8 @@"raisedHands": "","lowerParticipantHand": "","lowerParticipantsHand": ""+ },+ "recording": {+ "label": ""}}diff --git a/src/frontend/src/locales/en/rooms.json b/src/frontend/src/locales/en/rooms.jsonindex 17cc40da..1f618510 100644--- a/src/frontend/src/locales/en/rooms.json+++ b/src/frontend/src/locales/en/rooms.json@@ -163,5 +163,8 @@"raisedHands": "Raised hands","lowerParticipantHand": "Lower {{name}}'s hand","lowerParticipantsHand": "Lower all hands"+ },+ "recording": {+ "label": "Recording"}}diff --git a/src/frontend/src/locales/fr/rooms.json b/src/frontend/src/locales/fr/rooms.jsonindex 3429a916..872d4c7c 100644--- a/src/frontend/src/locales/fr/rooms.json+++ b/src/frontend/src/locales/fr/rooms.json@@ -163,5 +163,8 @@"raisedHands": "Mains levées","lowerParticipantHand": "Baisser la main de {{name}}","lowerParticipantsHand": "Baisser la main de tous les participants"+ },+ "recording": {+ "label": "Enregistrement"}}