Skip to content

Commit 35f0551

Browse files
benceruleanlugithub-actions
andauthored
Personal Data Consent Checkbox (#3697)
Co-authored-by: github-actions <[email protected]>
1 parent 838acef commit 35f0551

File tree

9 files changed

+42
-3
lines changed

9 files changed

+42
-3
lines changed

src/components/dialog/content/signin/SignUpForm.vue

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,25 @@
120120
}}</small>
121121
</div>
122122

123+
<!-- Personal Data Consent Checkbox -->
124+
<div class="flex items-center gap-2">
125+
<Checkbox
126+
input-id="comfy-org-sign-up-personal-data-consent"
127+
name="personalDataConsent"
128+
:binary="true"
129+
:invalid="$form.personalDataConsent?.invalid"
130+
/>
131+
<label
132+
for="comfy-org-sign-up-personal-data-consent"
133+
class="opacity-80 text-base font-medium"
134+
>
135+
{{ t('auth.signup.personalDataConsentLabel') }}
136+
</label>
137+
</div>
138+
<small v-if="$form.personalDataConsent?.error" class="text-red-500 -mt-4">{{
139+
$form.personalDataConsent.error.message
140+
}}</small>
141+
123142
<!-- Submit Button -->
124143
<Button
125144
type="submit"
@@ -133,6 +152,7 @@
133152
import { Form, FormSubmitEvent } from '@primevue/forms'
134153
import { zodResolver } from '@primevue/forms/resolvers/zod'
135154
import Button from 'primevue/button'
155+
import Checkbox from 'primevue/checkbox'
136156
import InputText from 'primevue/inputtext'
137157
import Password from 'primevue/password'
138158
import { computed, ref } from 'vue'

src/locales/en/main.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,8 @@
11281128
"signIn": "Sign in",
11291129
"signUpWithGoogle": "Sign up with Google",
11301130
"signUpWithGithub": "Sign up with Github",
1131-
"regionRestrictionChina": "In accordance with local regulatory requirements, our services are temporarily unavailable to users located in China."
1131+
"regionRestrictionChina": "In accordance with local regulatory requirements, our services are temporarily unavailable to users located in China.",
1132+
"personalDataConsentLabel": "I agree to the processing of my personal data."
11321133
},
11331134
"signOut": {
11341135
"signOut": "Log Out",
@@ -1149,7 +1150,8 @@
11491150
"number": "Must contain at least one number",
11501151
"special": "Must contain at least one special character",
11511152
"match": "Passwords must match"
1152-
}
1153+
},
1154+
"personalDataConsentRequired": "You must agree to the processing of your personal data."
11531155
},
11541156
"credits": {
11551157
"credits": "Credits",

src/locales/es/main.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"emailPlaceholder": "Ingresa tu correo electrónico",
4949
"passwordLabel": "Contraseña",
5050
"passwordPlaceholder": "Ingresa una nueva contraseña",
51+
"personalDataConsentLabel": "Acepto el tratamiento de mis datos personales.",
5152
"regionRestrictionChina": "De acuerdo con los requisitos regulatorios locales, nuestros servicios no están disponibles actualmente para usuarios ubicados en China continental.",
5253
"signIn": "Iniciar sesión",
5354
"signUpButton": "Registrarse",
@@ -1169,6 +1170,7 @@
11691170
"special": "Debe contener al menos un carácter especial",
11701171
"uppercase": "Debe contener al menos una letra mayúscula"
11711172
},
1173+
"personalDataConsentRequired": "Debes aceptar el procesamiento de tus datos personales.",
11721174
"required": "Requerido"
11731175
},
11741176
"welcome": {

src/locales/fr/main.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"emailPlaceholder": "Entrez votre email",
4949
"passwordLabel": "Mot de passe",
5050
"passwordPlaceholder": "Entrez un nouveau mot de passe",
51+
"personalDataConsentLabel": "J'accepte le traitement de mes données personnelles.",
5152
"regionRestrictionChina": "Conformément aux exigences réglementaires locales, nos services ne sont actuellement pas disponibles pour les utilisateurs situés en Chine continentale.",
5253
"signIn": "Se connecter",
5354
"signUpButton": "S'inscrire",
@@ -1169,6 +1170,7 @@
11691170
"special": "Doit contenir au moins un caractère spécial",
11701171
"uppercase": "Doit contenir au moins une lettre majuscule"
11711172
},
1173+
"personalDataConsentRequired": "Vous devez accepter le traitement de vos données personnelles.",
11721174
"required": "Requis"
11731175
},
11741176
"welcome": {

src/locales/ja/main.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"emailPlaceholder": "メールアドレスを入力してください",
4949
"passwordLabel": "パスワード",
5050
"passwordPlaceholder": "新しいパスワードを入力してください",
51+
"personalDataConsentLabel": "個人データの取扱いに同意します。",
5152
"regionRestrictionChina": "現地の規制要件に従い、当社のサービスは現在中国本土のユーザーにはご利用いただけません。",
5253
"signIn": "サインイン",
5354
"signUpButton": "サインアップ",
@@ -1169,6 +1170,7 @@
11691170
"special": "少なくとも1つの特殊文字を含む必要があります",
11701171
"uppercase": "少なくとも1つの大文字を含む必要があります"
11711172
},
1173+
"personalDataConsentRequired": "個人データの処理に同意する必要があります。",
11721174
"required": "必須"
11731175
},
11741176
"welcome": {

src/locales/ko/main.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"emailPlaceholder": "이메일을 입력하세요",
4949
"passwordLabel": "비밀번호",
5050
"passwordPlaceholder": "새 비밀번호를 입력하세요",
51+
"personalDataConsentLabel": "개인 정보 처리에 동의합니다.",
5152
"regionRestrictionChina": "현지 규제 요건에 따라, 본 서비스는 현재 중국 본토에 위치한 사용자에게 제공되지 않습니다.",
5253
"signIn": "로그인",
5354
"signUpButton": "가입하기",
@@ -1169,6 +1170,7 @@
11691170
"special": "적어도 하나의 특수 문자를 포함해야 합니다",
11701171
"uppercase": "적어도 하나의 대문자를 포함해야 합니다"
11711172
},
1173+
"personalDataConsentRequired": "개인 데이터 처리에 동의해야 합니다.",
11721174
"required": "필수"
11731175
},
11741176
"welcome": {

src/locales/ru/main.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"emailPlaceholder": "Введите вашу электронную почту",
4949
"passwordLabel": "Пароль",
5050
"passwordPlaceholder": "Введите новый пароль",
51+
"personalDataConsentLabel": "Я согласен на обработку моих персональных данных.",
5152
"regionRestrictionChina": "В соответствии с местными нормативными требованиями наши услуги в настоящее время недоступны для пользователей, находящихся в материковом Китае.",
5253
"signIn": "Войти",
5354
"signUpButton": "Зарегистрироваться",
@@ -1169,6 +1170,7 @@
11691170
"special": "Должен содержать хотя бы один специальный символ",
11701171
"uppercase": "Должен содержать хотя бы одну заглавную букву"
11711172
},
1173+
"personalDataConsentRequired": "Вы должны согласиться на обработку ваших персональных данных.",
11721174
"required": "Обязательно"
11731175
},
11741176
"welcome": {

src/locales/zh/main.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"emailPlaceholder": "输入您的电子邮件",
4949
"passwordLabel": "密码",
5050
"passwordPlaceholder": "输入新密码",
51+
"personalDataConsentLabel": "我同意处理我的个人数据。",
5152
"regionRestrictionChina": "根据当地法规要求,我们暂时无法为中国地区的用户提供服务。",
5253
"signIn": "登录",
5354
"signUpButton": "注册",
@@ -1169,6 +1170,7 @@
11691170
"special": "必须包含至少一个特殊字符",
11701171
"uppercase": "必须包含至少一个大写字母"
11711172
},
1173+
"personalDataConsentRequired": "您必须同意处理您的个人数据。",
11721174
"required": "必填"
11731175
},
11741176
"welcome": {

src/schemas/signInSchema.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,16 @@ export const signUpSchema = z
2626
.regex(/[a-z]/, t('validation.password.lowercase'))
2727
.regex(/\d/, t('validation.password.number'))
2828
.regex(/[^A-Za-z0-9]/, t('validation.password.special')),
29-
confirmPassword: z.string().min(1, t('validation.required'))
29+
confirmPassword: z.string().min(1, t('validation.required')),
30+
personalDataConsent: z.boolean()
3031
})
3132
.refine((data) => data.password === data.confirmPassword, {
3233
message: t('validation.password.match'),
3334
path: ['confirmPassword']
3435
})
36+
.refine((data) => data.personalDataConsent === true, {
37+
message: t('validation.personalDataConsentRequired'),
38+
path: ['personalDataConsent']
39+
})
3540

3641
export type SignUpData = z.infer<typeof signUpSchema>

0 commit comments

Comments
 (0)