From 15330ad4e151214ba6240b8251e050f3987c573a Mon Sep 17 00:00:00 2001 From: Emmanuel Pelletier Date: Tue, 3 Jun 2025 10:26:22 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7(env)=20disable=20the=20DINUM-speci?= =?UTF-8?q?fic=20footer=20by=20default?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the footer used is very specific to the DINUM/French gov instance so it should not be enabled by default for everyone. it's still a bit weird to keep this footer in the code here but at least it removes the issue easily. any PR to clean the code is appreciated :) --- docs/installation.md | 1 + env.d/development/common.dist | 2 ++ src/backend/meet/settings.py | 3 +++ src/frontend/src/api/useConfig.ts | 1 + src/frontend/src/layout/Footer.tsx | 5 +++++ 5 files changed, 12 insertions(+) diff --git a/docs/installation.md b/docs/installation.md index fbca263c..9c70ace3 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -281,6 +281,7 @@ These are the environmental options available on meet backend. | FRONTEND_SILENCE_LIVEKIT_DEBUG | Silence LiveKit debug logs | false | | 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 | | 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.dist index 90ee98ac..bf39a638 100644 --- a/env.d/development/common.dist +++ b/env.d/development/common.dist @@ -57,3 +57,5 @@ SCREEN_RECORDING_BASE_URL=http://localhost:3000/recordings # Telephony ROOM_TELEPHONY_ENABLED=True + +FRONTEND_USE_FRENCH_GOV_FOOTER=False diff --git a/src/backend/meet/settings.py b/src/backend/meet/settings.py index df9a5e84..9c340c56 100755 --- a/src/backend/meet/settings.py +++ b/src/backend/meet/settings.py @@ -324,6 +324,9 @@ class Base(Configuration): "feedback": values.DictValue( {}, environ_name="FRONTEND_FEEDBACK", environ_prefix=None ), + "use_french_gov_footer": values.BooleanValue( + False, environ_name="FRONTEND_USE_FRENCH_GOV_FOOTER", environ_prefix=None + ), } # Mail diff --git a/src/frontend/src/api/useConfig.ts b/src/frontend/src/api/useConfig.ts index 69e1b930..e6c21161 100644 --- a/src/frontend/src/api/useConfig.ts +++ b/src/frontend/src/api/useConfig.ts @@ -17,6 +17,7 @@ export interface ApiConfig { silence_livekit_debug_logs?: boolean is_silent_login_enabled?: boolean custom_css_url?: string + use_french_gov_footer?: boolean recording?: { is_enabled?: boolean available_modes?: RecordingMode[] diff --git a/src/frontend/src/layout/Footer.tsx b/src/frontend/src/layout/Footer.tsx index d8276391..15523d95 100644 --- a/src/frontend/src/layout/Footer.tsx +++ b/src/frontend/src/layout/Footer.tsx @@ -1,6 +1,7 @@ import { styled } from '@/styled-system/jsx' import { css } from '@/styled-system/css' import { A, Link } from '@/primitives' +import { useConfig } from '@/api/useConfig' import { useTranslation } from 'react-i18next' const StyledLi = styled('li', { @@ -120,6 +121,10 @@ const Marianne = () => { export const Footer = () => { const { t } = useTranslation('global', { keyPrefix: 'footer' }) + const { data } = useConfig() + if (!data?.use_french_gov_footer) { + return null + } return (