Open source video conferencing app powered by LiveKit. Built with Django and React.
🔧(homepage) let people use a simple login button instead of proconnect
Emmanuel Pelletierbbd700270fb3
diff --git a/docs/installation.md b/docs/installation.mdindex 9c70ace3..51cc7569 100644--- a/docs/installation.md+++ b/docs/installation.md@@ -282,6 +282,7 @@ These are the environmental options available on meet backend.| FRONTEND_IS_SILENT_LOGIN_ENABLED | Enable silent login feature | true || FRONTEND_FEEDBACK | Frontend feedback configuration | {} || FRONTEND_USE_FRENCH_GOV_FOOTER | Show the French government footer in the homepage | false |+| FRONTEND_USE_PROCONNECT_BUTTON | Show a "Login with ProConnect" button in the homepage instead of a "Login" button | false || DJANGO_EMAIL_BACKEND | Email backend library | django.core.mail.backends.smtp.EmailBackend || DJANGO_EMAIL_HOST | Host of the email server | || DJANGO_EMAIL_HOST_USER | User to connect to the email server | |diff --git a/env.d/development/common.dist b/env.d/development/common.distindex bf39a638..07b84ba3 100644--- a/env.d/development/common.dist+++ b/env.d/development/common.dist@@ -59,3 +59,4 @@ SCREEN_RECORDING_BASE_URL=http://localhost:3000/recordingsROOM_TELEPHONY_ENABLED=TrueFRONTEND_USE_FRENCH_GOV_FOOTER=False+FRONTEND_USE_PROCONNECT_BUTTON=Falsediff --git a/src/backend/meet/settings.py b/src/backend/meet/settings.pyindex 9c340c56..fd96983e 100755--- a/src/backend/meet/settings.py+++ b/src/backend/meet/settings.py@@ -327,6 +327,9 @@ class Base(Configuration):"use_french_gov_footer": values.BooleanValue(False, environ_name="FRONTEND_USE_FRENCH_GOV_FOOTER", environ_prefix=None),+ "use_proconnect_button": values.BooleanValue(+ False, environ_name="FRONTEND_USE_PROCONNECT_BUTTON", environ_prefix=None+ ),}diff --git a/src/frontend/src/api/useConfig.ts b/src/frontend/src/api/useConfig.tsindex e6c21161..2274fa24 100644--- a/src/frontend/src/api/useConfig.ts+++ b/src/frontend/src/api/useConfig.ts@@ -18,6 +18,7 @@ export interface ApiConfig {is_silent_login_enabled?: booleancustom_css_url?: stringuse_french_gov_footer?: boolean+ use_proconnect_button?: booleanrecording?: {is_enabled?: booleanavailable_modes?: RecordingMode[]diff --git a/src/frontend/src/components/LoginButton.tsx b/src/frontend/src/components/LoginButton.tsxnew file mode 100644index 00000000..70876d55--- /dev/null+++ b/src/frontend/src/components/LoginButton.tsx@@ -0,0 +1,12 @@+import { LinkButton } from '@/primitives'+import { authUrl } from '@/features/auth'+import { useTranslation } from 'react-i18next'++export const LoginButton = () => {+ const { t } = useTranslation('global', { keyPrefix: 'login' })+ return (+ <LinkButton href={authUrl()} data-attr="login" variant="primary">+ {t('buttonLabel')}+ </LinkButton>+ )+}diff --git a/src/frontend/src/components/ProConnectButton.tsx b/src/frontend/src/components/ProConnectButton.tsxindex 2ad12f63..6a0d83fe 100644--- a/src/frontend/src/components/ProConnectButton.tsx+++ b/src/frontend/src/components/ProConnectButton.tsx@@ -34,7 +34,7 @@ export const ProConnectButton = ({ hint = true }: ProConnectButtonProps) => {<VStack alignItems="start"><LinkclassName={proConnectButtonRecipe()}- aria-label={t('buttonLabel')}+ aria-label={t('proconnectButtonLabel')}href={authUrl()}data-attr="login"/>diff --git a/src/frontend/src/features/home/routes/Home.tsx b/src/frontend/src/features/home/routes/Home.tsxindex 7ae473ab..64f5bfee 100644--- a/src/frontend/src/features/home/routes/Home.tsx+++ b/src/frontend/src/features/home/routes/Home.tsx@@ -18,6 +18,8 @@ import { ReactNode, useState } from 'react'import { css } from '@/styled-system/css'import { menuRecipe } from '@/primitives/menuRecipe.ts'import { usePersistentUserChoices } from '@/features/rooms/livekit/hooks/usePersistentUserChoices'+import { useConfig } from '@/api/useConfig'+import { LoginButton } from '@/components/LoginButton'const Columns = ({ children }: { children?: ReactNode }) => {return (@@ -155,6 +157,8 @@ export const Home = () => {const { mutateAsync: createRoom } = useCreateRoom()const [laterRoomId, setLaterRoomId] = useState<null | string>(null)+ const { data } = useConfig()+return (<UserAware><Screen>@@ -210,14 +214,19 @@ export const Home = () => {</MenuItem></RACMenu></Menu>- ) : (+ ) : data?.use_proconnect_button ? (<ProConnectButton hint={false} />+ ) : (+ <LoginButton />)}<DialogTrigger><Buttonvariant="secondary"style={{- height: !isLoggedIn ? '56px' : undefined, // Temporary, Align with ProConnect Button fixed height+ height:+ !isLoggedIn && data?.use_proconnect_button+ ? '56px'+ : undefined, // Temporary, Align with ProConnect Button fixed height}}>{t('joinMeeting')}diff --git a/src/frontend/src/locales/en/global.json b/src/frontend/src/locales/en/global.jsonindex 1fa779a8..96c0d60b 100644--- a/src/frontend/src/locales/en/global.json+++ b/src/frontend/src/locales/en/global.json@@ -16,7 +16,8 @@"loading": "Loading…","loggedInUserTooltip": "Logged in as…","login": {- "buttonLabel": "Login with ProConnect",+ "proconnectButtonLabel": "Login with ProConnect",+ "buttonLabel": "Login","linkLabel": "What is ProConnect? - new tab","link": "What is ProConnect?"},