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

@@ -24,6 +24,7 @@ import OAuthProviderIcon from '../components/OAuthProviderIcon';
import { saveOAuthState } from '../utils/oauth';
import { getPendingReferralCode } from '../utils/referral';
import { UsersIcon, EmailIcon, RefreshIcon, ChevronDownIcon } from '@/components/icons';
import LegalFooter from '../components/LegalFooter';
export default function Login() {
const { t } = useTranslation();
@@ -112,6 +113,12 @@ export default function Login() {
});
const isEmailAuthEnabled = emailAuthConfig?.enabled ?? true;
const { data: footerEnabled } = useQuery({
queryKey: ['footer-enabled'],
queryFn: brandingApi.getFooterEnabled,
staleTime: 60000,
});
// Fetch enabled OAuth providers
const { data: oauthData } = useQuery({
queryKey: ['oauth-providers'],
@@ -737,6 +744,7 @@ export default function Login() {
)}
</div>
)}
{footerEnabled && <LegalFooter className="pt-1" />}
</div>
</div>
);