mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +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:
@@ -241,6 +241,25 @@ export const brandingApi = {
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// Legal footer enabled (public read for the login page, admin-only update)
|
||||
getFooterEnabled: async (): Promise<boolean> => {
|
||||
try {
|
||||
const response = await apiClient.get<{ enabled: boolean }>(
|
||||
'/cabinet/branding/footer-enabled',
|
||||
);
|
||||
return response.data.enabled;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
updateFooterEnabled: async (enabled: boolean): Promise<boolean> => {
|
||||
const response = await apiClient.patch<{ enabled: boolean }>(
|
||||
'/cabinet/branding/footer-enabled',
|
||||
{ enabled },
|
||||
);
|
||||
return response.data.enabled;
|
||||
},
|
||||
|
||||
// Get email auth enabled (public, no auth required)
|
||||
getEmailAuthEnabled: async (): Promise<EmailAuthEnabled> => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user