mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13: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:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user