Open source video conferencing app powered by LiveKit. Built with Django and React.
♻️(frontend) move fullscreen and recording shortcuts to their components
Cyril487340efcae1
diff --git a/src/frontend/src/features/rooms/livekit/components/controls/ToolsToggle.tsx b/src/frontend/src/features/rooms/livekit/components/controls/ToolsToggle.tsxindex 782377c1..668c7251 100644--- a/src/frontend/src/features/rooms/livekit/components/controls/ToolsToggle.tsx+++ b/src/frontend/src/features/rooms/livekit/components/controls/ToolsToggle.tsx@@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next'import { useSidePanel } from '../../hooks/useSidePanel'import { css } from '@/styled-system/css'import { ToggleButtonProps } from '@/primitives/ToggleButton'+import { useRegisterKeyboardShortcut } from '@/features/shortcuts/useRegisterKeyboardShortcut'export const ToolsToggle = ({variant = 'primaryTextDark',@@ -15,6 +16,11 @@ export const ToolsToggle = ({const { isToolsOpen, toggleTools } = useSidePanel()const tooltipLabel = isToolsOpen ? 'open' : 'closed'+ useRegisterKeyboardShortcut({+ id: 'recording',+ handler: toggleTools,+ })+return (<divclassName={css({diff --git a/src/frontend/src/features/rooms/livekit/prefabs/ControlBar/DesktopControlBar.tsx b/src/frontend/src/features/rooms/livekit/prefabs/ControlBar/DesktopControlBar.tsxindex de7897f2..83c9a43e 100644--- a/src/frontend/src/features/rooms/livekit/prefabs/ControlBar/DesktopControlBar.tsx+++ b/src/frontend/src/features/rooms/livekit/prefabs/ControlBar/DesktopControlBar.tsx@@ -12,6 +12,7 @@ import { StartMediaButton } from '../../components/controls/StartMediaButton'import { MoreOptions } from './MoreOptions'import { useRef } from 'react'import { useRegisterKeyboardShortcut } from '@/features/shortcuts/useRegisterKeyboardShortcut'+import { useFullScreen } from '../../hooks/useFullScreen'import { VideoDeviceControl } from '../../components/controls/Device/VideoDeviceControl'import { AudioDevicesControl } from '../../components/controls/Device/AudioDevicesControl'@@ -21,6 +22,8 @@ export function DesktopControlBar({const browserSupportsScreenSharing = supportsScreenSharing()const desktopControlBarEl = useRef<HTMLDivElement>(null)+ const { toggleFullScreen, isFullscreenAvailable } = useFullScreen({})+useRegisterKeyboardShortcut({id: 'focus-toolbar',handler: () => {@@ -32,6 +35,13 @@ export function DesktopControlBar({firstButton?.focus()},})++ useRegisterKeyboardShortcut({+ id: 'fullscreen',+ handler: toggleFullScreen,+ isDisabled: !isFullscreenAvailable,+ })+return (<divref={desktopControlBarEl}