diff --git a/webui/src/components/AccountManager.jsx b/webui/src/components/AccountManager.jsx index 54f669e..66658a0 100644 --- a/webui/src/components/AccountManager.jsx +++ b/webui/src/components/AccountManager.jsx @@ -10,7 +10,9 @@ import { MoreHorizontal, X, Server, - ShieldCheck + ShieldCheck, + Copy, + Check } from 'lucide-react' import clsx from 'clsx' @@ -18,6 +20,7 @@ export default function AccountManager({ config, onRefresh, onMessage, authFetch const [showAddKey, setShowAddKey] = useState(false) const [showAddAccount, setShowAddAccount] = useState(false) const [newKey, setNewKey] = useState('') + const [copiedKey, setCopiedKey] = useState(null) const [newAccount, setNewAccount] = useState({ email: '', mobile: '', password: '' }) const [loading, setLoading] = useState(false) const [validating, setValidating] = useState({}) @@ -298,15 +301,34 @@ export default function AccountManager({ config, onRefresh, onMessage, authFetch {config.keys?.length > 0 ? ( config.keys.map((key, i) => (
-
- {key.slice(0, 16)}**** +
+
+ {key.slice(0, 16)}**** +
+ {copiedKey === key && ( + 已复制 + )} +
+
+ +
-
)) ) : ( @@ -445,14 +467,24 @@ export default function AccountManager({ config, onRefresh, onMessage, authFetch
- setNewKey(e.target.value)} - autoFocus - /> +
+ setNewKey(e.target.value)} + autoFocus + /> + +
+

点击「生成」自动创建随机密钥