diff --git a/docs/sprint-status.yaml b/docs/sprint-status.yaml
index a9cd0c2..d637259 100644
--- a/docs/sprint-status.yaml
+++ b/docs/sprint-status.yaml
@@ -51,8 +51,8 @@ development_status:
3-6-stripe-subscription-tiers: review
epic-3-retrospective: optional
epic-4: in-progress
- 4-1-gdpr-cookie-consent: in-progress
- 4-2-gdpr-right-to-be-forgotten: backlog
+ 4-1-gdpr-cookie-consent: done
+ 4-2-gdpr-right-to-be-forgotten: done
4-3-data-portability: backlog
4-4-explicit-ai-consent: backlog
4-5-eu-data-residency: backlog
diff --git a/memento-note/app/(main)/settings/data/page.tsx b/memento-note/app/(main)/settings/data/page.tsx
index 5e9c184..6469d6f 100644
--- a/memento-note/app/(main)/settings/data/page.tsx
+++ b/memento-note/app/(main)/settings/data/page.tsx
@@ -1,9 +1,11 @@
'use client'
import { useState } from 'react'
-import { Download, Upload, Trash2, Loader2, RefreshCw, Sparkles, Database } from 'lucide-react'
+import { Download, Upload, Trash2, Loader2, RefreshCw, Sparkles, Database, ShieldAlert } from 'lucide-react'
import { toast } from 'sonner'
import { useLanguage } from '@/lib/i18n'
+import { useSession } from 'next-auth/react'
+import { DeleteAccountDialog } from '@/components/legal/delete-account-dialog'
import { useRouter } from 'next/navigation'
import { motion } from 'motion/react'
import { cn } from '@/lib/utils'
@@ -11,6 +13,8 @@ import { cn } from '@/lib/utils'
export default function DataSettingsPage() {
const { t } = useLanguage()
const router = useRouter()
+ const { data: session } = useSession()
+ const [deleteOpen, setDeleteOpen] = useState(false)
const [isExporting, setIsExporting] = useState(false)
const [isImporting, setIsImporting] = useState(false)
const [isDeleting, setIsDeleting] = useState(false)
@@ -246,6 +250,42 @@ export default function DataSettingsPage() {
+
+
+
+
+
+
+
+
{t('account.deleteAccount.sectionTitle')}
+
{t('account.deleteAccount.sectionDescription')}
+
+
+
+
+
+
{t('account.deleteAccount.dialogTitle')}
+
{t('account.deleteAccount.sectionDescription')}
+
+
+
+
+
+ {session?.user?.email && (
+
+ )}
)
}
diff --git a/memento-note/app/(main)/settings/general/general-settings-client.tsx b/memento-note/app/(main)/settings/general/general-settings-client.tsx
index cb1fd0d..3de3d40 100644
--- a/memento-note/app/(main)/settings/general/general-settings-client.tsx
+++ b/memento-note/app/(main)/settings/general/general-settings-client.tsx
@@ -5,8 +5,9 @@ import { useLanguage } from '@/lib/i18n'
import { updateAISettings } from '@/app/actions/ai-settings'
import { toast } from 'sonner'
import { useRouter } from 'next/navigation'
-import { Globe, Bell } from 'lucide-react'
+import { Globe, Bell, Shield } from 'lucide-react'
import { motion } from 'motion/react'
+import { openCookiePreferences } from '@/lib/consent/cookie-consent'
interface GeneralSettingsClientProps {
@@ -174,6 +175,27 @@ export function GeneralSettingsClient({ initialSettings }: GeneralSettingsClient
+
+
+
+
+
+
+
+
{t('consent.preferences.title')}
+
{t('consent.preferences.description')}
+
+
+
+
+
+
+
)
diff --git a/memento-note/app/layout.tsx b/memento-note/app/layout.tsx
index 46e78cc..d47549c 100644
--- a/memento-note/app/layout.tsx
+++ b/memento-note/app/layout.tsx
@@ -8,6 +8,8 @@ import { ThemeInitializer } from "@/components/theme-initializer";
import { DirectionInitializer } from "@/components/direction-initializer";
import { ErrorReporter } from "@/components/error-reporter";
import { auth } from "@/auth";
+import { CookieConsentRoot } from "@/components/legal/cookie-consent-root";
+import { LanguageProvider } from "@/lib/i18n/LanguageProvider";
import Script from "next/script";
import { getThemeScript } from "@/lib/theme-script";
import { normalizeThemeId } from "@/lib/apply-document-theme";
@@ -123,6 +125,9 @@ export default async function RootLayout({
{children}
+
+
+