feat(privacy-policy): Add privacy policy related text and links

This commit is contained in:
web@ppanel
2025-02-23 20:54:56 +07:00
parent 87381da1e5
commit baa68f03e3
60 changed files with 243 additions and 1 deletions
+23
View File
@@ -203,6 +203,29 @@ export async function updateNodeConfig(body: API.NodeConfig, options?: { [key: s
});
}
/** get Privacy Policy Config GET /v1/admin/system/privacy */
export async function getPrivacyPolicyConfig(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.PrivacyPolicyConfig }>('/v1/admin/system/privacy', {
method: 'GET',
...(options || {}),
});
}
/** Update Privacy Policy Config PUT /v1/admin/system/privacy */
export async function updatePrivacyPolicyConfig(
body: API.PrivacyPolicyConfig,
options?: { [key: string]: any },
) {
return request<API.Response & { data?: any }>('/v1/admin/system/privacy', {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** Get register config GET /v1/admin/system/register_config */
export async function getRegisterConfig(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.RegisterConfig }>('/v1/admin/system/register_config', {
+4
View File
@@ -879,6 +879,10 @@ declare namespace API {
list: PlatformInfo[];
};
type PrivacyPolicyConfig = {
privacy_policy: string;
};
type PubilcRegisterConfig = {
stop_register: boolean;
enable_ip_register_limit: boolean;
+8
View File
@@ -42,6 +42,14 @@ export async function getGlobalConfig(options?: { [key: string]: any }) {
});
}
/** Get Privacy Policy GET /v1/common/site/privacy */
export async function getPrivacyPolicy(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.PrivacyPolicyConfig }>('/v1/common/site/privacy', {
method: 'GET',
...(options || {}),
});
}
/** Get stat GET /v1/common/site/stat */
export async function getStat(options?: { [key: string]: any }) {
return request<API.Response & { data?: API.GetStatResponse }>('/v1/common/site/stat', {
+1
View File
@@ -32,6 +32,7 @@ export async function appleLoginCallback(
return request<API.Response & { data?: any }>('/v1/auth/oauth/callback/apple', {
method: 'POST',
data: formData,
requestType: 'form',
...(options || {}),
});
}
+4
View File
@@ -309,6 +309,10 @@ declare namespace API {
enable: boolean;
};
type PrivacyPolicyConfig = {
privacy_policy: string;
};
type PubilcRegisterConfig = {
stop_register: boolean;
enable_ip_register_limit: boolean;