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
@@ -0,0 +1,11 @@
import { getPrivacyPolicy } from '@/services/common/common';
import { Markdown } from '@workspace/ui/custom-components/markdown';
export default async function Page() {
const { data } = await getPrivacyPolicy();
return (
<div className='container py-8'>
<Markdown>{data.data?.privacy_policy || ''}</Markdown>
</div>
);
}
+3
View File
@@ -70,6 +70,9 @@ export default function Footer() {
<Link href='/tos' className='ml-2 underline'>
{t('tos')}
</Link>
<Link href='/privacy-policy' className='ml-2 underline'>
{t('privacyPolicy')}
</Link>
</div>
</div>
</footer>
+1
View File
@@ -23,6 +23,7 @@
"mobile": "Telefon"
},
"orWithEmail": "nebo pomocí e-mailu",
"privacyPolicy": "Zásady ochrany osobních údajů",
"register": {
"description": "Vytvořte si nový účet, vyplňte své údaje pro registraci.",
"email": "Zadejte prosím platnou e-mailovou adresu.",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "Telefon"
},
"orWithEmail": "oder mit E-Mail",
"privacyPolicy": "Datenschutzrichtlinie",
"register": {
"description": "Erstellen Sie ein neues Konto, indem Sie Ihre Informationen ausfüllen, um sich zu registrieren.",
"email": "Bitte geben Sie eine gültige E-Mail-Adresse ein.",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "Telephone"
},
"orWithEmail": "Or with Email",
"privacyPolicy": "Privacy Policy",
"register": {
"description": "Create a new account, fill in your information to register.",
"email": "Please enter a valid email address.",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "Teléfono"
},
"orWithEmail": "o usar correo electrónico",
"privacyPolicy": "Política de Privacidad",
"register": {
"description": "Crea una nueva cuenta, completa tu información para registrarte.",
"email": "Por favor, introduce una dirección de correo electrónico válida.",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "Teléfono"
},
"orWithEmail": "o usar correo electrónico",
"privacyPolicy": "Política de Privacidad",
"register": {
"description": "Crea una nueva cuenta, completa tu información para registrarte.",
"email": "Por favor, ingresa una dirección de correo electrónico válida.",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "تلفن"
},
"orWithEmail": "یا با ایمیل",
"privacyPolicy": "سیاست حفظ حریم خصوصی",
"register": {
"description": "ایجاد یک حساب کاربری جدید، اطلاعات خود را برای ثبت‌نام وارد کنید.",
"email": "لطفاً یک آدرس ایمیل معتبر وارد کنید.",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "Puhelin"
},
"orWithEmail": "tai käytä sähköpostia",
"privacyPolicy": "Tietosuojakäytäntö",
"register": {
"description": "Luo uusi tili täyttämällä tietosi rekisteröityäksesi.",
"email": "Anna kelvollinen sähköpostiosoite.",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "Téléphone"
},
"orWithEmail": "ou utiliser l'e-mail",
"privacyPolicy": "Politique de confidentialité",
"register": {
"description": "Créez un nouveau compte, remplissez vos informations pour vous inscrire.",
"email": "Veuillez entrer une adresse email valide.",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "टेलीफोन"
},
"orWithEmail": "या ईमेल का उपयोग करें",
"privacyPolicy": "गोपनीयता नीति",
"register": {
"description": "नया खाता बनाएं, पंजीकरण के लिए अपनी जानकारी भरें।",
"email": "कृपया एक मान्य ईमेल पता दर्ज करें।",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "Telefon"
},
"orWithEmail": "vagy használja az e-mailt",
"privacyPolicy": "Adatvédelmi irányelvek",
"register": {
"description": "Hozzon létre új fiókot, töltse ki adatait a regisztrációhoz.",
"email": "Kérjük, adjon meg egy érvényes e-mail címet.",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "電話"
},
"orWithEmail": "またはメールを使用",
"privacyPolicy": "プライバシーポリシー",
"register": {
"description": "新しいアカウントを作成し、情報を入力して登録してください。",
"email": "有効なメールアドレスを入力してください。",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "전화"
},
"orWithEmail": "또는 이메일 사용",
"privacyPolicy": "개인정보 처리방침",
"register": {
"description": "새 계정을 생성하고 정보를 입력하여 등록하세요.",
"email": "유효한 이메일 주소를 입력해 주세요.",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "Telefon"
},
"orWithEmail": "eller bruk e-post",
"privacyPolicy": "Personvernerklæring",
"register": {
"description": "Opprett en ny konto, fyll inn informasjonen din for å registrere deg.",
"email": "Vennligst oppgi en gyldig e-postadresse.",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "Telefon"
},
"orWithEmail": "lub użyj e-maila",
"privacyPolicy": "Polityka Prywatności",
"register": {
"description": "Utwórz nowe konto, wypełnij swoje dane, aby się zarejestrować.",
"email": "Proszę wprowadzić prawidłowy adres e-mail.",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "Telefone"
},
"orWithEmail": "ou use o e-mail",
"privacyPolicy": "Política de Privacidade",
"register": {
"description": "Crie uma nova conta, preencha suas informações para se registrar.",
"email": "Por favor, insira um endereço de e-mail válido.",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "Telefon"
},
"orWithEmail": "sau folosește e-mailul",
"privacyPolicy": "Politica de confidențialitate",
"register": {
"description": "Creați un cont nou, completați informațiile dvs. pentru a vă înregistra.",
"email": "Vă rugăm să introduceți o adresă de email validă.",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "Телефон"
},
"orWithEmail": "или с помощью электронной почты",
"privacyPolicy": "Политика конфиденциальности",
"register": {
"description": "Создайте новый аккаунт, заполните свои данные для регистрации.",
"email": "Пожалуйста, введите действительный адрес электронной почты.",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "โทรศัพท์"
},
"orWithEmail": "หรือใช้ที่อยู่อีเมล",
"privacyPolicy": "นโยบายความเป็นส่วนตัว",
"register": {
"description": "สร้างบัญชีใหม่ กรอกข้อมูลของคุณเพื่อสมัครสมาชิก",
"email": "กรุณากรอกที่อยู่อีเมลที่ถูกต้อง",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "Telefon"
},
"orWithEmail": "veya e-posta ile",
"privacyPolicy": "Gizlilik Politikası",
"register": {
"description": "Yeni bir hesap oluşturun, kaydolmak için bilgilerinizi doldurun.",
"email": "Lütfen geçerli bir e-posta adresi girin.",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "Телефон"
},
"orWithEmail": "або використовуйте електронну пошту",
"privacyPolicy": "Політика конфіденційності",
"register": {
"description": "Створіть новий обліковий запис, заповніть ваші дані для реєстрації.",
"email": "Будь ласка, введіть дійсну електронну адресу.",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "Điện thoại"
},
"orWithEmail": "hoặc sử dụng email",
"privacyPolicy": "Chính sách bảo mật",
"register": {
"description": "Tạo tài khoản mới, điền thông tin của bạn để đăng ký.",
"email": "Vui lòng nhập địa chỉ email hợp lệ.",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "电话"
},
"orWithEmail": "或使用邮箱",
"privacyPolicy": "隐私政策",
"register": {
"description": "创建新账户,填写您的信息以注册。",
"email": "请输入有效的电子邮件地址。",
+1
View File
@@ -23,6 +23,7 @@
"mobile": "電話"
},
"orWithEmail": "或使用電子郵件",
"privacyPolicy": "私隱政策",
"register": {
"description": "建立新帳戶,填寫您的資訊以註冊。",
"email": "請輸入有效的電郵地址。",
+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;
+4
View File
@@ -372,6 +372,10 @@ declare namespace API {
deduction_amount: number;
};
type PrivacyPolicyConfig = {
privacy_policy: string;
};
type PubilcRegisterConfig = {
stop_register: boolean;
enable_ip_register_limit: boolean;
+4 -1
View File
@@ -50,7 +50,10 @@ export function Logout() {
if (!isBrowser()) return;
cookies.remove('Authorization');
const pathname = location.pathname;
if (!['', '/', '/auth', '/tos'].includes(pathname) && !pathname.startsWith('/oauth/')) {
if (
!['', '/', '/auth', '/tos', '/privacy-policy'].includes(pathname) &&
!pathname.startsWith('/oauth/')
) {
setRedirectUrl(location.pathname);
location.href = `/auth`;
}