diff --git a/frontend/src/components/CookieBanner.tsx b/frontend/src/components/CookieBanner.tsx index af0f0fd..3b4e31e 100644 --- a/frontend/src/components/CookieBanner.tsx +++ b/frontend/src/components/CookieBanner.tsx @@ -1,11 +1,13 @@ import React, { useState, useEffect } from 'react'; import { - Paper, Typography, Button, - Stack, alpha, - Slide + Dialog, + DialogContent, + DialogTitle, + DialogActions, + Box } from '@mui/material'; import { useTranslation } from 'react-i18next'; import type { CatppuccinTheme } from '../theme'; @@ -36,55 +38,70 @@ const CookieBanner: React.FC = ({ onThemeChange, currentTheme onThemeChange(newTheme); }; - if (!open) return null; - return ( - - {}} // Disable closing by clicking backdrop + disableEscapeKeyDown + maxWidth="sm" + fullWidth + PaperProps={{ + sx: { borderRadius: 4, border: '1px solid', borderColor: 'primary.main', - bgcolor: (theme) => alpha(theme.palette.background.paper, 0.95), + bgcolor: (theme) => alpha(theme.palette.background.paper, 0.98), backdropFilter: 'blur(10px)', - }} - > - - {t('cookieBanner.title')} 🍪 - - + boxShadow: (theme) => `0 20px 50px ${alpha(theme.palette.primary.main, 0.2)}`, + } + }} + > + + {t('cookieBanner.title')} 🍪 + + + {t('cookieBanner.description')} - - - - - - - + + + Technical Details: + + + • Session ID: Required for login & authentication.
+ • CSRF Token: Protects your account from malicious attacks.
+ • Preference Store: Remembers your theme and language choices. +
+
+ + + + + + ); }; diff --git a/frontend/src/i18n.ts b/frontend/src/i18n.ts index b49a535..16f06ca 100644 --- a/frontend/src/i18n.ts +++ b/frontend/src/i18n.ts @@ -152,8 +152,8 @@ const resources = { }, "cookieBanner": { "title": "Cookie Settings", - "description": "We use cookies to ensure you get the best experience on our website. Would you like to switch to Holy Dark mode? It's easier on the eyes!", - "accept": "Accept Cookies", + "description": "We use essential technical cookies to manage your login sessions, store your preferred theme and language settings, and ensure the security of your account. These cookies are strictly necessary for the site to function properly. Would you like to switch to Holy Dark mode before you start? It's easier on the eyes!", + "accept": "Accept and Continue", "switchToDark": "Switch to Holy Dark", "switchToLight": "Stay on Holy Light" } @@ -308,8 +308,8 @@ const resources = { }, "cookieBanner": { "title": "Cookie-Einstellungen", - "description": "Wir verwenden Cookies, um sicherzustellen, dass Sie das beste Erlebnis auf unserer Website erhalten. Möchten Sie zum Holy Dark Modus wechseln? Er ist schonender für die Augen!", - "accept": "Cookies akzeptieren", + "description": "Wir verwenden technisch notwendige Cookies, um Ihre Login-Sitzungen zu verwalten, Ihre bevorzugten Design- und Spracheinstellungen zu speichern und die Sicherheit Ihres Kontos zu gewährleisten. Diese Cookies sind zwingend erforderlich, damit die Website ordnungsgemäß funktioniert. Möchten Sie zum Holy Dark Modus wechseln, bevor Sie beginnen? Er ist schonender für die Augen!", + "accept": "Akzeptieren und Fortfahren", "switchToDark": "Zu Holy Dark wechseln", "switchToLight": "Bei Holy Light bleiben" }