'use client'; import * as Icons from '../Icons'; import ToggleCard from '../fields/ToggleCard'; import PrivacyEditor from '../PrivacyEditor'; import { CONTACT_RETENTION_DEFAULT, CONTACT_RETENTION_MAX, isHttpUrl } from '@/lib/config/schema'; import type { SectionProps } from './types'; export default function LegalSection({ settings, update }: SectionProps) { // The Impressum drops a non-http(s) contact URL with a warning in the server // log, where nobody looks; say it here instead. const contactUrl = settings.legal?.contactUrl?.trim(); const contactUrlInvalid = !!contactUrl && !isHttpUrl(contactUrl); const notifyUrl = settings.contact?.notifyUrl?.trim(); const notifyUrlInvalid = !!notifyUrl && !isHttpUrl(notifyUrl); return (
Configure the legal disclosure page required by the German Digitale-Dienste-Gesetz (DDG).
{settings.legal?.enabled && ( View /impressum ↗ )}Leave empty for the § 5 DDG line in the site language. Set it when a different law applies, e.g. § 5 ECG in Austria.
Must start with https:// or http://. Any other link is left off the page.
)}{notifyUrlInvalid ? 'Must start with https:// or http://.' : 'Gets a fixed "new message" push, with nothing about the sender. Pick a topic name nobody can guess. CONTACT_NOTIFY_URL overrides this.'}