Some checks failed
Formulaire in-app de remontée de bug / suggestion pour les utilisateurs connectés (PR 1/2 de l'issue #80). - Modèle Prisma `ContactMessage` (+ relation inverse sur `UserProfile`) et migration `20260908120000_contact_message` — table neuve, aucun backfill. `authorId` nullable + `onDelete: SetNull` : un signalement survit à la suppression de son compte. - Contrat partagé `schemas/contact.ts` : `CONTACT_MESSAGE_TYPES`, `submitContactMessageSchema` (type enum, message 10-5000 trim, pageUrl / appVersion optionnels — jamais le user-agent). - Module API `contact` : `POST /contact` (`requireAuth`, monté `/contact`), `204` sans corps. Le user-agent est lu de l'en-tête de requête, jamais du corps. Émet `analytics.recordEvent(contact.submitted, …)`. - Page `/parametres/contact` (`ContactPage` + `contact.ts` + `.scss`) : select de type, textarea, validation cliente via le schéma partagé, états succès / erreur (`ErrorMessageService`, jamais `err.message`). Entrée de nav « Nous contacter » dans `SETTINGS_ITEMS` + clé i18n + icône. `apiClient.submitContactMessage(input)` ajoute `pageUrl` / `appVersion`. - Tests : `apps/api/test/contact.test.ts` (Mocha — insertion, en-tête UA, champs nullables, message trop court / trop long, type inconnu), `contact.feature` + steps (Cypress e2e — envoi + confirmation + contexte), `contact-page.cy.ts` (rendu + garde `RequireAuth` + label d'erreur). - Docs : `batch-cooking-modele.md`, `backend-architecture.md`, `frontend-architecture.md`. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
44 lines
2.1 KiB
TypeScript
44 lines
2.1 KiB
TypeScript
// Sidebar/nav icon set — thin, named re-exports of lucide-react glyphs
|
||
// rather than importing `lucide-react` directly in every consumer. Keeps a
|
||
// single place documenting "which glyph stands for which app concept"
|
||
// (the mapping itself, decided once, isn't obvious from a bare `Settings`
|
||
// or `Home` import) and keeps consumer diffs small if a glyph ever needs
|
||
// to change. Previously a hand-drawn custom SVG set (24×24, stroke-based,
|
||
// no fill) — lucide-react uses the same stroke-based "line icon" language
|
||
// (default `strokeWidth={2}`, round caps/joins) so the switch is visually
|
||
// a no-op, just swaps who draws the paths.
|
||
//
|
||
// Every one of these is always paired with visible text (the nav label, or
|
||
// a `title` tooltip when the sidebar is collapsed) — purely decorative, so
|
||
// every consumer passes `aria-hidden="true"` itself (unlike the old custom
|
||
// `Icon` wrapper, lucide doesn't set this by default).
|
||
export {
|
||
BookOpen as RecipesIcon,
|
||
Calendar as PlanningIcon,
|
||
ChevronLeft as ChevronLeftIcon,
|
||
ExternalLink as SourceLinkIcon,
|
||
Globe as PublicIcon,
|
||
Home as HouseholdIcon,
|
||
Info as CreditsIcon,
|
||
Leaf as DietPreferencesIcon,
|
||
// The mobile bottom nav's catch-all "Plus" tab (Paramètres + Compte,
|
||
// see AppLayout.tsx's `MobileBottomNav`) — a hamburger reads as "more"
|
||
// even in a bottom-tab position, unlike on desktop where it usually
|
||
// means "open a side drawer".
|
||
Menu as MoreIcon,
|
||
// "Contact" settings entry (issue #80) — the in-app bug/suggestion form.
|
||
// A speech bubble reads as "send us a message"; distinct from the Rss
|
||
// "Sources" feed glyph and the generic Settings cog.
|
||
MessageSquare as ContactIcon,
|
||
Palette as UserPreferencesIcon,
|
||
Rss as SourcesIcon,
|
||
Settings as SettingsIcon,
|
||
ShoppingCart as ShoppingListIcon,
|
||
// "Paramètres d'application" (issue #86) — distinct from the generic
|
||
// Settings glyph (already the "Paramètres" section toggle itself) and
|
||
// from UserPreferencesIcon (theme/tutorials): this one is specifically
|
||
// about the app installation (version, updates, app-open behavior).
|
||
Smartphone as AppSettingsIcon,
|
||
Star as FavoriteIcon,
|
||
User as AccountIcon,
|
||
} from "lucide-react";
|