refactor: enhance localization and styling in account deletion flow

- Updated Chinese localization file to include a new "cancel" message for improved user experience during account deletion.
- Adjusted `DeleteAccountCard` footer styling for better alignment and spacing of buttons.
- Modified `auth.ts` to disable freshness check for user deletion, ensuring smoother account removal process.
This commit is contained in:
javayhu 2025-03-17 00:02:44 +08:00
parent 1fd3ef7eeb
commit bb7e36cc85
3 changed files with 6 additions and 3 deletions

View File

@ -360,7 +360,8 @@
"fail": "删除账号失败"
},
"save": "保存",
"saving": "保存中..."
"saving": "保存中...",
"cancel": "取消"
},
"billing": {
"title": "账单"

View File

@ -113,7 +113,7 @@ export function DeleteAccountCard() {
{t('deleteAccount.confirmDescription')}
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogFooter className="flex justify-end gap-3">
<Button
variant="outline"
onClick={() => setShowConfirmation(false)}

View File

@ -37,7 +37,9 @@ export const auth = betterAuth({
expiresIn: 60 * 60 * 24 * 7,
updateAge: 60 * 60 * 24,
// https://www.better-auth.com/docs/concepts/session-management#session-freshness
freshAge: 60 * 60 * 24,
// https://www.better-auth.com/docs/concepts/users-accounts#authentication-requirements
// disable freshness check for user deletion
freshAge: 0 /* 60 * 60 * 24 */,
},
emailAndPassword: {
enabled: true,