From caac14904de3f874de35d74810b47da62870fd97 Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Thu, 21 May 2026 06:56:03 +0200 Subject: [PATCH] feat(ui): global footer with copyright + Powered by ZenQuality MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a single Footer component mounted in App.tsx via a flex-column layout so it sticks to the bottom of every route (Home, NewReport, Editor, NotFound). Content per locale: - "© . Tous droits réservés. / All rights reserved." - "Propulsé par / Powered by [ZenQuality logo]" — logo wraps an external link to https://zenquality.fr (target=_blank + rel=noopener noreferrer). footerName comes from runtime config (APP_FOOTER_NAME); year is computed at render time. Two new i18n keys added in parity in fr.ts + en.ts (footer.all_rights_reserved, footer.powered_by) — dict parity test stays green (155/155). Co-Authored-By: Claude Opus 4.7 (1M context) --- src/app/App.tsx | 18 ++++++++++++------ src/components/brand/Footer.tsx | 32 ++++++++++++++++++++++++++++++++ src/i18n/en.ts | 4 ++++ src/i18n/fr.ts | 4 ++++ 4 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 src/components/brand/Footer.tsx diff --git a/src/app/App.tsx b/src/app/App.tsx index bccc2d58..509653de 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -1,5 +1,6 @@ import { BrowserRouter, Routes, Route } from 'react-router-dom' import { ConfigProvider } from './providers/ConfigProvider' +import Footer from '@/components/brand/Footer' import HomeRoute from './routes/HomeRoute' import NewReportRoute from './routes/NewReportRoute' import EditorRoute from './routes/EditorRoute' @@ -9,12 +10,17 @@ export default function App() { return ( - - } /> - } /> - } /> - } /> - +
+
+ + } /> + } /> + } /> + } /> + +
+
+
) diff --git a/src/components/brand/Footer.tsx b/src/components/brand/Footer.tsx new file mode 100644 index 00000000..e9ced645 --- /dev/null +++ b/src/components/brand/Footer.tsx @@ -0,0 +1,32 @@ +import { useConfig } from '@/app/providers/ConfigProvider' +import { useT } from '@/i18n/useT' + +export default function Footer() { + const cfg = useConfig() + const t = useT() + const year = new Date().getFullYear() + return ( + + ) +} diff --git a/src/i18n/en.ts b/src/i18n/en.ts index df297504..abac298b 100644 --- a/src/i18n/en.ts +++ b/src/i18n/en.ts @@ -30,6 +30,10 @@ export const en: Dict = { 'home.import.error_incompatible_version': 'This PDF uses format v{version}, incompatible with the current version (v2). Re-export the report from a recent version of the app.', + // footer + 'footer.all_rights_reserved': 'All rights reserved.', + 'footer.powered_by': 'Powered by', + 'not_found.title': 'Page not found', 'not_found.description': 'The requested path does not exist.', diff --git a/src/i18n/fr.ts b/src/i18n/fr.ts index 03cdca10..518e744c 100644 --- a/src/i18n/fr.ts +++ b/src/i18n/fr.ts @@ -34,6 +34,10 @@ export const fr: Dict = { 'home.import.error_incompatible_version': "Ce PDF est au format v{version}, incompatible avec la version actuelle (v2). Réexportez le bilan depuis une version récente de l'application.", + // footer + 'footer.all_rights_reserved': 'Tous droits réservés.', + 'footer.powered_by': 'Propulsé par', + // not found 'not_found.title': 'Page introuvable', 'not_found.description': "Le chemin demandé n'existe pas.",