diff --git a/frontend/hyperliquid.html b/frontend/hyperliquid.html index 85b726e..d267db3 100644 --- a/frontend/hyperliquid.html +++ b/frontend/hyperliquid.html @@ -290,6 +290,27 @@ color: #ff4444; } + /* 钱包地址 */ + .wallet-link { + color: var(--accent); + text-decoration: none; + font-size: 14px; + font-weight: 500; + display: flex; + align-items: center; + gap: 6px; + transition: opacity 0.2s; + } + + .wallet-link:hover { + opacity: 0.7; + text-decoration: underline; + } + + .wallet-icon { + font-size: 16px; + } + /* 空状态 */ .empty-state { padding: 60px 20px; @@ -458,6 +479,17 @@
${{ formatNumber(account.total_margin_used) }}
+
+
钱包地址
+
+ + 🔗 + {{ formatWalletAddress(account.wallet_address) }} + +
+
Hyperliquid Bot
+
+
挂单数量
{{ orders.entry_orders + orders.tp_sl_orders }}
@@ -607,7 +639,8 @@ current_leverage: 0, max_leverage: 10, drawdown: 0, - circuit_breaker_threshold: 10 + circuit_breaker_threshold: 10, + wallet_address: null }, positions: [], orders: { @@ -727,6 +760,17 @@ } catch (error) { alert('取消失败: ' + error.message); } + }, + formatWalletAddress(address) { + if (!address) return 'N/A'; + // 显示前6位和后4位,中间用...省略 + if (address.length <= 10) return address; + return `${address.substring(0, 6)}...${address.substring(address.length - 4)}`; + }, + getHyperbotUrl(address) { + if (!address) return '#'; + // Hyperliquid Bot 链接格式 + return `https://hyperliquid.bot/hyperbot?address=${address}`; } }, async mounted() {