Skip to content

Let's use AI to Earn!

delete account confirm cantnot be closed

bulaienaofutuojsonzhangc9c816cb07c0
diff --git a/src/app/[lng]/accounts/components/AccountSidebar/DeleteUserConfirmModal.tsx b/src/app/[lng]/accounts/components/AccountSidebar/DeleteUserConfirmModal.tsx
index 229718cc..df9afe35 100644
--- a/src/app/[lng]/accounts/components/AccountSidebar/DeleteUserConfirmModal.tsx
+++ b/src/app/[lng]/accounts/components/AccountSidebar/DeleteUserConfirmModal.tsx
@@ -4,6 +4,7 @@ import { Button, Modal } from "antd";
import { deleteAccountsApi } from "@/api/account";
import AvatarPlat from "@/components/AvatarPlat";
import { SocialAccount } from "@/api/types/account.type";
+import { useTransClient } from "@/app/i18n/client";
export interface IDeleteUserConfirmModalRef {}
@@ -26,17 +27,19 @@ const DeleteUserConfirmModal = memo(
ref: ForwardedRef<IDeleteUserConfirmModalRef>,
) => {
const [deleteLoading, setDeleteLoading] = useState(false);
+ const { t } = useTransClient("account");
return (
<Modal
open={open}
- title="删除提示"
+ title={t("deleteConfirm.title" as any)}
width={500}
zIndex={1002}
+ onCancel={() => onClose()}
rootClassName={styles.userManageDeleteHitModal}
footer={
<>
- <Button onClick={() => onClose()}>取消</Button>
+ <Button onClick={() => onClose()}>{t("deleteConfirm.cancel" as any)}</Button>
<Button
type="primary"
loading={deleteLoading}
@@ -51,17 +54,13 @@ const DeleteUserConfirmModal = memo(
onClose();
}}
>
- 确认
+ {t("deleteConfirm.confirm" as any)}
</Button>
</>
}
>
<p>
- 是否删除以下
- <span style={{ color: "var(--errerColor)" }}>
- {deleteUsers.length}
- </span>
- 个账号?
+ {t("deleteConfirm.content" as any, { count: deleteUsers.length } as any)}
</p>
<div className={styles["userManageDeleteHitModal-users"]}>
{deleteUsers.map((v) => {
diff --git a/src/app/i18n/locales/en/account.json b/src/app/i18n/locales/en/account.json
index b6a71e32..f327d25b 100644
--- a/src/app/i18n/locales/en/account.json
+++ b/src/app/i18n/locales/en/account.json
@@ -106,5 +106,11 @@
"bilibili": "Bilibili",
"wxgzh": "WeChat Official",
"douyin": "Douyin",
- "wxsph": "WeChat Channels"
+ "wxsph": "WeChat Channels",
+ "deleteConfirm": {
+ "title": "Delete Confirmation",
+ "content": "Are you sure you want to delete {{count}} account(s)?",
+ "cancel": "Cancel",
+ "confirm": "Confirm"
+ }
}
\ No newline at end of file
diff --git a/src/app/i18n/locales/zh-CN/account.json b/src/app/i18n/locales/zh-CN/account.json
index f589f809..5824ae21 100644
--- a/src/app/i18n/locales/zh-CN/account.json
+++ b/src/app/i18n/locales/zh-CN/account.json
@@ -106,5 +106,11 @@
"bilibili": "哔哩哔哩",
"wxgzh": "微信公众号",
"douyin": "抖音",
- "wxsph": "微信视频号"
+ "wxsph": "微信视频号",
+ "deleteConfirm": {
+ "title": "删除提示",
+ "content": "是否删除以下 {{count}} 个账号?",
+ "cancel": "取消",
+ "confirm": "确认"
+ }
}
\ No newline at end of file