feat(ui): add password strength validation and toggle visibility in registration and reset password forms (#773)

Co-authored-by: tinkle-community <tinklefund@gmail.com>
This commit is contained in:
Ember
2025-11-09 00:36:28 +08:00
committed by GitHub
parent 90d09e63e5
commit 4667c3bf00
8 changed files with 251 additions and 85 deletions

View File

@@ -364,12 +364,23 @@ export const translations = {
// Login & Register
login: 'Sign In',
register: 'Sign Up',
username: 'Username',
email: 'Email',
password: 'Password',
confirmPassword: 'Confirm Password',
usernamePlaceholder: 'your username',
emailPlaceholder: 'your@email.com',
passwordPlaceholder: 'Enter your password',
confirmPasswordPlaceholder: 'Re-enter your password',
passwordRequirements: 'Password requirements',
passwordRuleMinLength: 'Minimum 8 characters',
passwordRuleUppercase: 'At least 1 uppercase letter',
passwordRuleLowercase: 'At least 1 lowercase letter',
passwordRuleNumber: 'At least 1 number',
passwordRuleSpecial: 'At least 1 special character (@#$%!&*?)',
passwordRuleMatch: 'Passwords match',
passwordNotMeetRequirements:
'Password does not meet the security requirements',
otpPlaceholder: '000000',
loginTitle: 'Sign in to your account',
registerTitle: 'Create a new account',
@@ -419,6 +430,12 @@ export const translations = {
registrationFailed: 'Registration failed',
verificationFailed: 'OTP verification failed',
invalidCredentials: 'Invalid email or password',
weak: 'Weak',
medium: 'Medium',
strong: 'Strong',
passwordStrength: 'Password strength',
passwordStrengthHint:
'Use at least 8 characters with mix of letters, numbers and symbols',
passwordMismatch: 'Passwords do not match',
emailRequired: 'Email is required',
passwordRequired: 'Password is required',
@@ -1089,12 +1106,22 @@ export const translations = {
// Login & Register
login: '登录',
register: '注册',
username: '用户名',
email: '邮箱',
password: '密码',
confirmPassword: '确认密码',
usernamePlaceholder: '请输入用户名',
emailPlaceholder: '请输入邮箱地址',
passwordPlaceholder: '请输入密码至少6位',
confirmPasswordPlaceholder: '请再次输入密码',
passwordRequirements: '密码要求',
passwordRuleMinLength: '至少 8 位',
passwordRuleUppercase: '至少 1 个大写字母',
passwordRuleLowercase: '至少 1 个小写字母',
passwordRuleNumber: '至少 1 个数字',
passwordRuleSpecial: '至少 1 个特殊字符(@#$%!&*?',
passwordRuleMatch: '两次密码一致',
passwordNotMeetRequirements: '密码不符合安全要求',
otpPlaceholder: '000000',
loginTitle: '登录到您的账户',
registerTitle: '创建新账户',
@@ -1140,6 +1167,11 @@ export const translations = {
registrationFailed: '注册失败',
verificationFailed: 'OTP验证失败',
invalidCredentials: '邮箱或密码错误',
weak: '弱',
medium: '中',
strong: '强',
passwordStrength: '密码强度',
passwordStrengthHint: '建议至少8位包含大小写、数字和符号',
passwordMismatch: '两次输入的密码不一致',
emailRequired: '请输入邮箱',
passwordRequired: '请输入密码',