From 13dc0213f39f79f9d6e6bf76f67ff67ba9914da0 Mon Sep 17 00:00:00 2001 From: CoderMageFox Date: Wed, 5 Nov 2025 13:03:41 +0800 Subject: [PATCH] feat: add help tooltips for Aster exchange configuration fields Added interactive help icons with tooltips for Aster exchange fields (user, signer, privateKey) to guide users through correct configuration. Changes: - Added HelpCircle icon from lucide-react - Created reusable Tooltip component with hover/click interaction - Added bilingual help descriptions in translations.ts - User field: explains main wallet address (login address) - Signer field: explains API wallet address generation - Private Key field: clarifies local-only usage, never transmitted This prevents user confusion and configuration errors when setting up Aster exchange. Co-Authored-By: tinkle-community --- web/src/components/AITradersPage.tsx | 70 ++++++++++++++++++++++++++-- web/src/i18n/translations.ts | 14 +++++- 2 files changed, 80 insertions(+), 4 deletions(-) diff --git a/web/src/components/AITradersPage.tsx b/web/src/components/AITradersPage.tsx index e1c73699..f3d4353e 100644 --- a/web/src/components/AITradersPage.tsx +++ b/web/src/components/AITradersPage.tsx @@ -23,6 +23,7 @@ import { Users, AlertTriangle, BookOpen, + HelpCircle, } from 'lucide-react' // 获取友好的AI模型名称 @@ -1064,6 +1065,51 @@ export function AITradersPage({ onTraderSelect }: AITradersPageProps) { ) } +// Tooltip Helper Component +function Tooltip({ + content, + children, +}: { + content: string + children: React.ReactNode +}) { + const [show, setShow] = useState(false) + + return ( +
+
setShow(true)} + onMouseLeave={() => setShow(false)} + onClick={() => setShow(!show)} + > + {children} +
+ {show && ( +
+ {content} +
+
+ )} +
+ ) +} + // Signal Source Configuration Modal Component function SignalSourceModal({ coinPoolUrl, @@ -1772,10 +1818,16 @@ function ExchangeConfigModal({ <>