From 8942cf3c705bbc78a6b3317599658e9bb86dd31b Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Mon, 16 Mar 2026 13:56:06 +0100 Subject: Add legal document shenanigans Closes #147 --- src/frontend/app/routes/settings.tsx | 82 +++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) (limited to 'src/frontend/app/routes/settings.tsx') diff --git a/src/frontend/app/routes/settings.tsx b/src/frontend/app/routes/settings.tsx index e7fdffa..0497f34 100644 --- a/src/frontend/app/routes/settings.tsx +++ b/src/frontend/app/routes/settings.tsx @@ -1,5 +1,7 @@ -import { Computer, Moon, Sun } from "lucide-react"; +import { Computer, Moon, Sun, Trash2 } from "lucide-react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; +import { Link } from "react-router"; import { usePageTitle } from "~/contexts/PageTitleContext"; import { useApp, type Theme } from "../AppContext"; import "../tailwind-full.css"; @@ -7,6 +9,8 @@ import "../tailwind-full.css"; export default function Settings() { const { t, i18n } = useTranslation(); usePageTitle(t("navbar.settings", "Ajustes")); + const [showClearConfirm, setShowClearConfirm] = useState(false); + const [cleared, setCleared] = useState(false); const { theme, setTheme, @@ -192,6 +196,82 @@ export default function Settings() { + + {/* Privacy / Clear data */} +
+

+ {t("settings.privacy_title", "Privacidad y datos")} +

+ {!showClearConfirm && !cleared && ( + + )} + {showClearConfirm && ( +
+

+ {t( + "settings.clear_data_confirm", + "Se eliminarán tus paradas favoritas, nombres personalizados, paradas recientes, historial de rutas, lugares guardados y posición del mapa. Las preferencias de ajustes se conservarán." + )} +

+
+ + +
+
+ )} + {cleared && ( +

+ {t( + "settings.clear_data_done", + "Tus datos se han borrado correctamente." + )} +

+ )} +

+ + {t("settings.privacy_policy_link", "Política de privacidad")} + +

+
); } -- cgit v1.3