feat: perf ui & complete i18n

This commit is contained in:
Junyan Qin
2025-08-17 14:09:28 +08:00
parent dd30d08c68
commit 7bbaa4fcad
6 changed files with 32 additions and 6 deletions

View File

@@ -261,7 +261,7 @@ export default function HomeSidebar({
fill="currentColor"
className="w-4 h-4 mr-2"
>
<path d="M6 10V8C6 5.79086 7.79086 4 10 4H14C16.2091 4 18 5.79086 18 8V10H20C20.5523 10 21 10.4477 21 11V21C21 21.5523 20.5523 22 20 22H4C3.44772 22 3 21.5523 3 21V11C3 10.4477 3.44772 10 4 10H6ZM8 10H16V8C16 6.89543 15.1046 6 14 6H10C8.89543 6 8 6.89543 8 8V10ZM11 15.7324C10.4022 15.3866 10 14.7403 10 14C10 12.8954 10.8954 12 12 12C13.1046 12 14 12.8954 14 14C14 14.7403 13.5978 15.3866 13 15.7324V18H11V15.7324Z"></path>
<path d="M6 8V7C6 3.68629 8.68629 1 12 1C15.3137 1 18 3.68629 18 7V8H20C20.5523 8 21 8.44772 21 9V21C21 21.5523 20.5523 22 20 22H4C3.44772 22 3 21.5523 3 21V9C3 8.44772 3.44772 8 4 8H6ZM19 10H5V20H19V10ZM11 15.7324C10.4022 15.3866 10 14.7403 10 14C10 12.8954 10.8954 12 12 12C13.1046 12 14 12.8954 14 14C14 14.7403 13.5978 15.3866 13 15.7324V18H11V15.7324ZM8 8H16V7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7V8Z"></path>
</svg>
{t('common.changePassword')}
</Button>

View File

@@ -18,7 +18,7 @@ const buttonVariants = cva(
secondary:
'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',
ghost:
'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/100',
link: 'text-primary underline-offset-4 hover:underline',
},
size: {

View File

@@ -56,8 +56,8 @@ const enUS = {
confirmPasswordRequired: 'Confirm password is required',
passwordsDoNotMatch: 'Passwords do not match',
changePasswordSuccess: 'Password changed successfully',
changePasswordFailed: 'Failed to change password',
currentPasswordIncorrect: 'Current password is incorrect',
changePasswordFailed:
'Failed to change password, please check your current password',
},
notFound: {
title: 'Page not found',

View File

@@ -45,6 +45,20 @@ const jaJP = {
forgotPassword: 'パスワードを忘れた?',
loading: '読み込み中...',
theme: 'テーマ',
changePassword: 'パスワードを変更',
currentPassword: '現在のパスワード',
newPassword: '新しいパスワード',
confirmNewPassword: '新しいパスワードを確認',
enterCurrentPassword: '現在のパスワードを入力',
enterNewPassword: '新しいパスワードを入力',
enterConfirmPassword: '新しいパスワードを確認',
currentPasswordRequired: '現在のパスワードは必須です',
newPasswordRequired: '新しいパスワードは必須です',
confirmPasswordRequired: '新しいパスワードを確認してください',
passwordsDoNotMatch: '新しいパスワードが一致しません',
changePasswordSuccess: 'パスワードの変更に成功しました',
changePasswordFailed:
'パスワードの変更に失敗しました。現在のパスワードを確認してください',
},
notFound: {
title: 'ページが見つかりません',

View File

@@ -56,8 +56,7 @@ const zhHans = {
confirmPasswordRequired: '确认密码不能为空',
passwordsDoNotMatch: '两次输入的密码不一致',
changePasswordSuccess: '密码修改成功',
changePasswordFailed: '密码修改失败',
currentPasswordIncorrect: '当前密码不正确',
changePasswordFailed: '密码修改失败,请检查当前密码是否正确',
},
notFound: {
title: '页面不存在',

View File

@@ -44,6 +44,19 @@ const zhHant = {
forgotPassword: '忘記密碼?',
loading: '載入中...',
theme: '主題',
changePassword: '修改密碼',
currentPassword: '當前密碼',
newPassword: '新密碼',
confirmNewPassword: '確認新密碼',
enterCurrentPassword: '輸入當前密碼',
enterNewPassword: '輸入新密碼',
enterConfirmPassword: '確認新密碼',
currentPasswordRequired: '當前密碼不能為空',
newPasswordRequired: '新密碼不能為空',
confirmPasswordRequired: '確認密碼不能為空',
passwordsDoNotMatch: '兩次輸入的密碼不一致',
changePasswordSuccess: '密碼修改成功',
changePasswordFailed: '密碼修改失敗,請檢查當前密碼是否正確',
},
notFound: {
title: '頁面不存在',