From ddc4cdeb60226590c5fca3cea58b20a79a1380ea Mon Sep 17 00:00:00 2001 From: Ember <15190419+0xEmberZz@users.noreply.github.com> Date: Tue, 11 Nov 2025 12:17:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=B0=8F=E5=B1=8F?= =?UTF-8?q?=E5=B9=95=E8=AE=BE=E5=A4=87=E4=B8=8A=E5=AF=B9=E8=AF=9D=E6=A1=86?= =?UTF-8?q?=E9=AB=98=E5=BA=A6=E8=BF=87=E9=AB=98=E6=97=A0=E6=B3=95=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E7=9A=84=E9=97=AE=E9=A2=98=20(#681)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/AITradersPage.tsx | 1159 ++++++++++++---------- web/src/components/TraderConfigModal.tsx | 14 +- 2 files changed, 666 insertions(+), 507 deletions(-) diff --git a/web/src/components/AITradersPage.tsx b/web/src/components/AITradersPage.tsx index 079a956d..32252ad1 100644 --- a/web/src/components/AITradersPage.tsx +++ b/web/src/components/AITradersPage.tsx @@ -1288,85 +1288,96 @@ function SignalSourceModal({ } return ( -
+

{t('signalSourceConfig', language)}

-
-
- - setCoinPool(e.target.value)} - placeholder="https://api.example.com/coinpool" - className="w-full px-3 py-2 rounded" - style={{ - background: '#0B0E11', - border: '1px solid #2B3139', - color: '#EAECEF', - }} - /> -
- {t('coinPoolDescription', language)} + +
+
+ + setCoinPool(e.target.value)} + placeholder="https://api.example.com/coinpool" + className="w-full px-3 py-2 rounded" + style={{ + background: '#0B0E11', + border: '1px solid #2B3139', + color: '#EAECEF', + }} + /> +
+ {t('coinPoolDescription', language)} +
-
-
- - setOiTop(e.target.value)} - placeholder="https://api.example.com/oitop" - className="w-full px-3 py-2 rounded" +
+ + setOiTop(e.target.value)} + placeholder="https://api.example.com/oitop" + className="w-full px-3 py-2 rounded" + style={{ + background: '#0B0E11', + border: '1px solid #2B3139', + color: '#EAECEF', + }} + /> +
+ {t('oiTopDescription', language)} +
+
+ +
-
- {t('oiTopDescription', language)} + > +
+ ℹ️ {t('information', language)} +
+
+
{t('signalSourceInfo1', language)}
+
{t('signalSourceInfo2', language)}
+
{t('signalSourceInfo3', language)}
+
-
- ℹ️ {t('information', language)} -
-
-
{t('signalSourceInfo1', language)}
-
{t('signalSourceInfo2', language)}
-
{t('signalSourceInfo3', language)}
-
-
- -
-
- ) : null} + {t('secretKey', language)} + + setSecretKey(e.target.value)} + placeholder={t('enterSecretKey', language)} + className="w-full px-3 py-2 rounded" + style={{ + background: '#0B0E11', + border: '1px solid #2B3139', + color: '#EAECEF', + }} + required + />
- )} + + {selectedExchange.id === 'okx' && ( +
+ + setPassphrase(e.target.value)} + placeholder={t('enterPassphrase', language)} + className="w-full px-3 py-2 rounded" + style={{ + background: '#0B0E11', + border: '1px solid #2B3139', + color: '#EAECEF', + }} + required + /> +
+ )} + + {/* Binance 白名单IP提示 */} + {selectedExchange.id === 'binance' && ( +
+
+ {t('whitelistIP', language)} +
+
+ {t('whitelistIPDesc', language)} +
+ + {loadingIP ? ( +
+ {t('loadingServerIP', language)} +
+ ) : serverIP && serverIP.public_ip ? ( +
+ + {serverIP.public_ip} + + +
+ ) : null} +
+ )} + + )} + + {/* Hyperliquid 交易所的字段 */} + {selectedExchange.id === 'hyperliquid' && ( + <> +
+ + setApiKey(e.target.value)} + placeholder={t('enterPrivateKey', language)} + className="w-full px-3 py-2 rounded" + style={{ + background: '#0B0E11', + border: '1px solid #2B3139', + color: '#EAECEF', + }} + required + /> +
+ {t('hyperliquidPrivateKeyDesc', language)} +
+
+ + )} + + {/* Aster 交易所的字段 */} + {selectedExchange.id === 'aster' && ( + <> +
+ + setAsterUser(e.target.value)} + placeholder={t('enterUser', language)} + className="w-full px-3 py-2 rounded" + style={{ + background: '#0B0E11', + border: '1px solid #2B3139', + color: '#EAECEF', + }} + required + /> +
+ +
+ + setAsterSigner(e.target.value)} + placeholder={t('enterSigner', language)} + className="w-full px-3 py-2 rounded" + style={{ + background: '#0B0E11', + border: '1px solid #2B3139', + color: '#EAECEF', + }} + required + /> +
+ +
+ + setAsterPrivateKey(e.target.value)} + placeholder={t('enterPrivateKey', language)} + className="w-full px-3 py-2 rounded" + style={{ + background: '#0B0E11', + border: '1px solid #2B3139', + color: '#EAECEF', + }} + required + /> +
)} @@ -2451,56 +2618,44 @@ function ExchangeConfigModal({ )}
- - )} - -
- -
- {t('testnetDescription', language)}
-
-
- - {' '} - {t('securityWarning', language)} - +
+ + {' '} + {t('securityWarning', language)} + +
+
+ {selectedExchange.id === 'aster' && ( +
{t('asterUsdtWarning', language)}
+ )} +
{t('exchangeConfigWarning1', language)}
+
{t('exchangeConfigWarning2', language)}
+
{t('exchangeConfigWarning3', language)}
+
-
- {selectedExchange.id === 'aster' && ( -
{t('asterUsdtWarning', language)}
- )} -
{t('exchangeConfigWarning1', language)}
-
{t('exchangeConfigWarning2', language)}
-
{t('exchangeConfigWarning3', language)}
-
-
- - )} + + )} +
-
+