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:
Fringg
2026-06-30 07:30:59 +03:00
parent fd5500c85b
commit 984d1b0776
8 changed files with 136 additions and 4 deletions

View 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>
);
}