feat: 实现 Builder API Key 系统级配置和 Gasless 交易支持
- 新增系统配置表(SystemConfig)用于存储 Builder API Key - 实现 Builder API Key 的前端配置页面 - 集成 Builder Relayer API 支持 Gasless 交易 - 在 API 健康检查中添加 Builder Relayer API 检测 - 移除前端 API 测试功能,简化配置页面 - 修复赎回仓位时的 Builder API Key 检查逻辑 - 更新错误处理,引导用户配置 Builder API Key
This commit is contained in:
@@ -19,7 +19,8 @@ import {
|
||||
TwitterOutlined,
|
||||
GlobalOutlined,
|
||||
CheckCircleOutlined,
|
||||
NotificationOutlined
|
||||
NotificationOutlined,
|
||||
KeyOutlined
|
||||
} from '@ant-design/icons'
|
||||
import type { MenuProps } from 'antd'
|
||||
import type { ReactNode } from 'react'
|
||||
@@ -121,6 +122,11 @@ const Layout: React.FC<LayoutProps> = ({ children }) => {
|
||||
icon: <SettingOutlined />,
|
||||
label: t('menu.systemSettings'),
|
||||
children: [
|
||||
{
|
||||
key: '/system-settings',
|
||||
icon: <SettingOutlined />,
|
||||
label: t('menu.systemOverview') || '概览'
|
||||
},
|
||||
{
|
||||
key: '/system-settings/language',
|
||||
icon: <GlobalOutlined />,
|
||||
@@ -136,6 +142,11 @@ const Layout: React.FC<LayoutProps> = ({ children }) => {
|
||||
icon: <LinkOutlined />,
|
||||
label: t('menu.proxy')
|
||||
},
|
||||
{
|
||||
key: '/system-settings/builder-api-key',
|
||||
icon: <KeyOutlined />,
|
||||
label: t('menu.builderApiKey') || 'Builder API Key'
|
||||
},
|
||||
{
|
||||
key: '/system-settings/notifications',
|
||||
icon: <NotificationOutlined />,
|
||||
@@ -173,8 +184,8 @@ const Layout: React.FC<LayoutProps> = ({ children }) => {
|
||||
}
|
||||
|
||||
const handleMenuClick = ({ key }: { key: string }) => {
|
||||
// 如果是父菜单,不导航
|
||||
if (key === '/copy-trading-management' || key === '/system-settings') {
|
||||
// 如果是父菜单,不导航(但 /system-settings 作为子菜单项时可以导航)
|
||||
if (key === '/copy-trading-management') {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user