mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
feat(cabinet): legal footer on login + admin toggle
Adds a legal footer (Public Offer / Privacy / Recurring Payments) under the login card, gated by CABINET_FOOTER_ENABLED (backend endpoint added in bot PR #3011), plus an admin toggle in BrandingTab and ru/en/fa/zh i18n. Footer-only subset of PR #464 — excludes the unrelated storePartnerClickId helper and the version/CHANGELOG churn. Co-authored-by: smediainfo <dev@matrixvpn.top>
This commit is contained in:
46
src/components/LegalFooter.tsx
Normal file
46
src/components/LegalFooter.tsx
Normal file
@@ -0,0 +1,46 @@
|
||||
import { Fragment } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
interface LegalLink {
|
||||
href: string;
|
||||
labelKey: string;
|
||||
fallback: string;
|
||||
}
|
||||
|
||||
const LINKS: LegalLink[] = [
|
||||
{ href: '/offer', labelKey: 'footer.offer', fallback: 'Публичная оферта' },
|
||||
{ href: '/privacy', labelKey: 'footer.privacy', fallback: 'Политика конфиденциальности' },
|
||||
{ href: '/recurrent-payments', labelKey: 'footer.recurrent', fallback: 'Рекуррентные платежи' },
|
||||
];
|
||||
|
||||
interface LegalFooterProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export default function LegalFooter({ className = '' }: LegalFooterProps) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<footer
|
||||
className={`flex flex-wrap items-center justify-center gap-x-2.5 gap-y-1 text-center text-[11px] leading-relaxed text-dark-500 ${className}`}
|
||||
>
|
||||
{LINKS.map((link, index) => (
|
||||
<Fragment key={link.href}>
|
||||
{index > 0 && (
|
||||
<span className="text-dark-700" aria-hidden="true">
|
||||
·
|
||||
</span>
|
||||
)}
|
||||
<a
|
||||
href={link.href}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="transition-colors hover:text-accent-400"
|
||||
>
|
||||
{t(link.labelKey, link.fallback)}
|
||||
</a>
|
||||
</Fragment>
|
||||
))}
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user