diff --git a/web/src/components/auth/PasswordResetConfirm.js b/web/src/components/auth/PasswordResetConfirm.js
index e799583f..025161ac 100644
--- a/web/src/components/auth/PasswordResetConfirm.js
+++ b/web/src/components/auth/PasswordResetConfirm.js
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
import { API, copy, showError, showNotice, getLogo, getSystemName } from '../../helpers';
import { useSearchParams, Link } from 'react-router-dom';
import { Button, Card, Form, Typography, Banner } from '@douyinfe/semi-ui';
-import { IconMail, IconLock } from '@douyinfe/semi-icons';
+import { IconMail, IconLock, IconCopy } from '@douyinfe/semi-icons';
import { useTranslation } from 'react-i18next';
import Background from '/example.png';
@@ -71,7 +71,7 @@ const PasswordResetConfirm = () => {
let password = res.data.data;
setNewPassword(password);
await copy(password);
- showNotice(`${t('密码已重置并已复制到剪贴板')}: ${password}`);
+ showNotice(`${t('密码已重置并已复制到剪贴板:')} ${password}`);
} else {
showError(message);
}
@@ -137,11 +137,19 @@ const PasswordResetConfirm = () => {
className="!rounded-md"
disabled={true}
prefix={}
- onClick={(e) => {
- e.target.select();
- navigator.clipboard.writeText(newPassword);
- showNotice(`${t('密码已复制到剪贴板')}: ${newPassword}`);
- }}
+ suffix={
+ }
+ type="tertiary"
+ theme="borderless"
+ onClick={async () => {
+ await copy(newPassword);
+ showNotice(`${t('密码已复制到剪贴板:')} ${newPassword}`);
+ }}
+ >
+ {t('复制')}
+
+ }
/>
)}
diff --git a/web/src/i18n/locales/en.json b/web/src/i18n/locales/en.json
index a7201fe5..520e30c2 100644
--- a/web/src/i18n/locales/en.json
+++ b/web/src/i18n/locales/en.json
@@ -265,7 +265,8 @@
"设置页脚": "Set Footer",
"新版本": "New Version",
"关闭": "Close",
- "密码已重置并已复制到剪贴板": "Password has been reset and copied to clipboard",
+ "密码已重置并已复制到剪贴板:": "Password has been reset and copied to clipboard: ",
+ "密码已复制到剪贴板:": "Password has been copied to clipboard: ",
"密码重置确认": "Password Reset Confirmation",
"邮箱地址": "Email address",
"提交": "Submit",