Update legal documents and localization for compliance and clarity
- Updated .env.example with legal operator details for compliance. - Refactored Impressum, Privacy, and Terms pages to utilize a new LegalDocument component for improved structure and maintainability. - Enhanced localization files to include legal content in both German and English, ensuring accurate representation of legal information. - Improved i18n handling to support locale detection from Accept-Language headers.
This commit is contained in:
@@ -1,46 +1,13 @@
|
||||
import { LegalDocument } from '@/components/site/legal-document';
|
||||
import { LegalShell } from '@/components/site/legal-shell';
|
||||
import { env } from '@/lib/env';
|
||||
import { getLocale, t } from '@/lib/i18n';
|
||||
|
||||
export default async function ImpressumPage() {
|
||||
const locale = await getLocale();
|
||||
const configured = Boolean(env.LEGAL_OPERATOR_NAME && env.LEGAL_OPERATOR_ADDRESS && env.LEGAL_OPERATOR_EMAIL);
|
||||
|
||||
return (
|
||||
<LegalShell title={t(locale, 'legal.impressum.title')}>
|
||||
<p className="text-sm text-muted-foreground">{t(locale, 'legal.impressum.intro')}</p>
|
||||
{configured ? (
|
||||
<dl className="space-y-3 text-sm">
|
||||
<div>
|
||||
<dt className="font-medium">{t(locale, 'legal.impressum.name')}</dt>
|
||||
<dd className="text-muted-foreground">{env.LEGAL_OPERATOR_NAME}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt className="font-medium">{t(locale, 'legal.impressum.address')}</dt>
|
||||
<dd className="whitespace-pre-wrap text-muted-foreground">{env.LEGAL_OPERATOR_ADDRESS}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt className="font-medium">{t(locale, 'legal.impressum.email')}</dt>
|
||||
<dd className="text-muted-foreground">
|
||||
<a className="text-primary hover:underline" href={`mailto:${env.LEGAL_OPERATOR_EMAIL}`}>
|
||||
{env.LEGAL_OPERATOR_EMAIL}
|
||||
</a>
|
||||
</dd>
|
||||
</div>
|
||||
{env.LEGAL_OPERATOR_PHONE ? (
|
||||
<div>
|
||||
<dt className="font-medium">{t(locale, 'legal.impressum.phone')}</dt>
|
||||
<dd className="text-muted-foreground">{env.LEGAL_OPERATOR_PHONE}</dd>
|
||||
</div>
|
||||
) : null}
|
||||
</dl>
|
||||
) : (
|
||||
<p className="rounded-md border border-border bg-muted/40 px-4 py-3 text-sm">
|
||||
{t(locale, 'legal.impressum.notConfigured')}
|
||||
</p>
|
||||
)}
|
||||
<p className="text-sm text-muted-foreground">{t(locale, 'legal.impressum.p1')}</p>
|
||||
<p className="text-sm text-muted-foreground">{t(locale, 'legal.impressum.p2')}</p>
|
||||
<LegalDocument locale={locale} page="impressum" />
|
||||
</LegalShell>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { LegalDocument } from '@/components/site/legal-document';
|
||||
import { LegalShell } from '@/components/site/legal-shell';
|
||||
import { getLocale, t } from '@/lib/i18n';
|
||||
|
||||
@@ -6,12 +7,7 @@ export default async function PrivacyPage() {
|
||||
|
||||
return (
|
||||
<LegalShell title={t(locale, 'legal.privacy.title')}>
|
||||
<p className="text-sm text-amber-600 dark:text-amber-400">{t(locale, 'legal.scaffoldNotice')}</p>
|
||||
{['p1', 'p2', 'p3', 'p4', 'p5'].map((key) => (
|
||||
<p key={key} className="text-sm text-muted-foreground">
|
||||
{t(locale, `legal.privacy.${key}`)}
|
||||
</p>
|
||||
))}
|
||||
<LegalDocument locale={locale} page="privacy" />
|
||||
</LegalShell>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { LegalDocument } from '@/components/site/legal-document';
|
||||
import { LegalShell } from '@/components/site/legal-shell';
|
||||
import { getLocale, t } from '@/lib/i18n';
|
||||
|
||||
@@ -6,12 +7,7 @@ export default async function TermsPage() {
|
||||
|
||||
return (
|
||||
<LegalShell title={t(locale, 'legal.terms.title')}>
|
||||
<p className="text-sm text-amber-600 dark:text-amber-400">{t(locale, 'legal.scaffoldNotice')}</p>
|
||||
{['p1', 'p2', 'p3', 'p4'].map((key) => (
|
||||
<p key={key} className="text-sm text-muted-foreground">
|
||||
{t(locale, `legal.terms.${key}`)}
|
||||
</p>
|
||||
))}
|
||||
<LegalDocument locale={locale} page="terms" />
|
||||
</LegalShell>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user