From 364bbf4f0b23211747ac01fcb7338faafc164d1d Mon Sep 17 00:00:00 2001 From: kaelvar Date: Tue, 22 Sep 2026 22:04:40 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(frontend)=20let=20signed-out=20visito?= =?UTF-8?q?rs=20start=20a=20meeting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The home page only offers meeting creation to authenticated users, while the backend already serves ephemeral rooms to anonymous visitors when ALLOW_UNREGISTERED_ROOMS is enabled (the flag is checked in the room retrieve view, not in the create one). Expose the flag in the frontend configuration and, when it is on, show the existing "Create a meeting" button to signed-out visitors. It navigates to a freshly generated room id rather than calling POST /rooms/, which stays reserved for registered rooms and for authenticated users. The invite dialog opens for such a creator when the room is unregistered (null id) and the navigation carries `create`. The `mode` computed in Room is left untouched, so permissions and the join screen behave as before. The home buttons row now wraps: signed-out visitors can see three controls (create, join, login), and at the xsm breakpoint the fixed-width ProConnect button leaves too little room for the other two. --- CHANGELOG.md | 2 ++ src/backend/core/api/__init__.py | 1 + src/frontend/src/api/useConfig.ts | 1 + .../CreateUnregisteredMeetingButton.tsx | 19 +++++++++++++++++++ .../src/features/home/routes/Home.tsx | 9 ++++++++- .../rooms/components/InviteDialog.tsx | 10 +++++++--- 6 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 src/frontend/src/features/home/components/CreateUnregisteredMeetingButton.tsx diff --git a/CHANGELOG.md b/CHANGELOG.md index b3d4dacb..11f5a24a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ and this project adheres to - 🔒(backend) throttle meeting link generation - 🔒️(backend) add a daily cap on room creation - 🔧(summary) add setting to control Sentry traces sampling rate +- ✨(frontend) let signed-out visitors start a meeting +- ✨(backend) expose `allow_unregistered_rooms` in the frontend configuration ### Fixed diff --git a/src/backend/core/api/__init__.py b/src/backend/core/api/__init__.py index 66dda030..803b3e8f 100644 --- a/src/backend/core/api/__init__.py +++ b/src/backend/core/api/__init__.py @@ -73,6 +73,7 @@ def get_frontend_configuration(request): "default_sources": settings.LIVEKIT_DEFAULT_SOURCES, "default_video_codec": settings.LIVEKIT_DEFAULT_VIDEO_CODEC, }, + "allow_unregistered_rooms": settings.ALLOW_UNREGISTERED_ROOMS, "authenticated_users_can_edit_display_name": ( settings.AUTHENTICATED_PARTICIPANTS_CAN_EDIT_DISPLAY_NAME ), diff --git a/src/frontend/src/api/useConfig.ts b/src/frontend/src/api/useConfig.ts index 6bc0a812..8da9bed3 100644 --- a/src/frontend/src/api/useConfig.ts +++ b/src/frontend/src/api/useConfig.ts @@ -28,6 +28,7 @@ export interface ApiConfig { custom_css_url?: string use_french_gov_footer?: boolean use_proconnect_button?: boolean + allow_unregistered_rooms?: boolean idle_disconnect_warning_delay?: number recording?: { is_enabled?: boolean diff --git a/src/frontend/src/features/home/components/CreateUnregisteredMeetingButton.tsx b/src/frontend/src/features/home/components/CreateUnregisteredMeetingButton.tsx new file mode 100644 index 00000000..d37343a4 --- /dev/null +++ b/src/frontend/src/features/home/components/CreateUnregisteredMeetingButton.tsx @@ -0,0 +1,19 @@ +import { useTranslation } from 'react-i18next' +import { Button } from '@/primitives' +import { navigateTo } from '@/navigation/navigateTo' +import { generateRoomId } from '@/features/rooms' + +export const CreateUnregisteredMeetingButton = () => { + const { t } = useTranslation('home') + return ( + + ) +} diff --git a/src/frontend/src/features/home/routes/Home.tsx b/src/frontend/src/features/home/routes/Home.tsx index 3293c574..dda45c99 100644 --- a/src/frontend/src/features/home/routes/Home.tsx +++ b/src/frontend/src/features/home/routes/Home.tsx @@ -9,6 +9,7 @@ import { JoinMeetingDialog } from '../components/JoinMeetingDialog' import { IntroSlider } from '../components/IntroSlider' import { MoreLink } from '../components/MoreLink' import { CreateMeetingMenu } from '../components/CreateMeetingMenu' +import { CreateUnregisteredMeetingButton } from '../components/CreateUnregisteredMeetingButton' import { ReactNode, useEffect, useState } from 'react' import { css } from '@/styled-system/css' @@ -189,13 +190,19 @@ const Home = () => { display: 'flex', gap: 0.5, flexDirection: { base: 'column', xsm: 'row' }, + flexWrap: 'wrap', alignItems: { base: 'center', xsm: 'items-start' }, })} > {isLoggedIn ? ( ) : ( - + <> + {data?.allow_unregistered_rooms && ( + + )} + + )}