import React, { useCallback, useEffect, useState } from 'react'; import { Link } from 'react-router-dom'; import { ArrowLeft, BadgeCheck, Database, EyeOff, FileText, Fingerprint, LockKeyhole, RadioTower, ShieldCheck, UserRoundCog, } from 'lucide-react'; import { api } from '@/api'; import { useAuth } from '@/hooks/useAuth'; import { Button } from '@/components/ui/button'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; const iconByTitle = { Overview: ShieldCheck, 'Data Collection': Database, 'Version Checking': RadioTower, 'Administrative Access': UserRoundCog, Logging: FileText, 'Third-Party Services': EyeOff, Security: LockKeyhole, 'Changes to This Policy': BadgeCheck, Contact: Fingerprint, }; export default function PrivacyPage() { const { user } = useAuth(); const [privacy, setPrivacy] = useState(null); const [loading, setLoading] = useState(true); const load = useCallback(async () => { setLoading(true); try { setPrivacy(await api.privacy()); } finally { setLoading(false); } }, []); useEffect(() => { load(); }, [load]); const sections = privacy?.sections || []; const updated = privacy?.last_updated ? new Date(privacy.last_updated).toLocaleDateString(undefined, { month: 'long', day: 'numeric', year: 'numeric' }) : null; return (
{updated && (
Updated {updated}
)}
{privacy?.name || 'Privacy'} {loading ? 'Loading privacy details...' : privacy?.summary}
{[ ['Local-first', 'Data stays in your installation'], ['No telemetry', 'No analytics or ad tracking'], ['User-owned', 'Login details stay in user view'], ].map(([label, text]) => (

{label}

{text}

))}
{sections.map((section, index) => { const Icon = iconByTitle[section.title] || ShieldCheck; return (
{String(index + 1).padStart(2, '0')}

{section.title}

    {section.items.map(item => (
  • {item}
  • ))}
); })}
Login history shown in your Profile modal is for your account view. It is not shown on the Admin page.
); }