From 359c4af0984d2ab257c22efef763c4142d638fda Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Sat, 22 Aug 2026 23:38:42 +0200 Subject: [PATCH] fixup! wip handle device in use --- .../controls/Device/PermissionNeededButton.tsx | 18 ++++++++++++------ .../controls/Device/ToggleDevice.tsx | 5 +++-- .../livekit/hooks/useWatchMediaDeviceErrors.ts | 2 +- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/frontend/src/features/rooms/livekit/components/controls/Device/PermissionNeededButton.tsx b/src/frontend/src/features/rooms/livekit/components/controls/Device/PermissionNeededButton.tsx index 0641ae80..388af375 100644 --- a/src/frontend/src/features/rooms/livekit/components/controls/Device/PermissionNeededButton.tsx +++ b/src/frontend/src/features/rooms/livekit/components/controls/Device/PermissionNeededButton.tsx @@ -5,16 +5,18 @@ import { css } from '@/styled-system/css' import { useTranslation } from 'react-i18next' type PermissionNeededButtonProps = { - tooltip?: string - onPress?: () => void + tooltip?: string | null + onPress?: (() => void) | null + ariaLabel?: string } export const PermissionNeededButton = ({ tooltip, onPress, + ariaLabel, }: PermissionNeededButtonProps) => { const { t } = useTranslation('rooms', { keyPrefix: 'permissionsButton' }) - const label = tooltip ?? t('tooltip') + const label = tooltip === undefined ? t('tooltip') : tooltip return (