diff --git a/frontend/src/modules/platform/components/PlatformSettingsModal.tsx b/frontend/src/modules/platform/components/PlatformSettingsModal.tsx index 9e02614..8ac0696 100644 --- a/frontend/src/modules/platform/components/PlatformSettingsModal.tsx +++ b/frontend/src/modules/platform/components/PlatformSettingsModal.tsx @@ -2,6 +2,7 @@ import { useEffect, useMemo, useState } from 'react'; import axios from 'axios'; import { ChevronLeft, ChevronRight, Pencil, Plus, RefreshCw, Search, Trash2, X } from 'lucide-react'; import { APP_ENDPOINTS } from '../../../config/env'; +import { LucentSelect } from '../../../components/lucent/LucentSelect'; import type { PlatformSettings, SystemSettingItem } from '../types'; import { LucentIconButton } from '../../../components/lucent/LucentIconButton'; import { useLucentPrompt } from '../../../components/lucent/LucentPromptProvider'; @@ -328,13 +329,13 @@ export function PlatformSettingsModal({ setDraft((prev) => ({ ...prev, name: event.target.value }))} /> {isZh ? '类型' : 'Type'} - setDraft((prev) => ({ ...prev, value_type: event.target.value }))}> + setDraft((prev) => ({ ...prev, value_type: event.target.value }))}> string integer float boolean json - + {isZh ? '当前值' : 'Value'} {draft.value_type === 'json' ? ( diff --git a/frontend/src/modules/platform/components/PlatformSettingsPage.tsx b/frontend/src/modules/platform/components/PlatformSettingsPage.tsx index 446f724..e928201 100644 --- a/frontend/src/modules/platform/components/PlatformSettingsPage.tsx +++ b/frontend/src/modules/platform/components/PlatformSettingsPage.tsx @@ -2,6 +2,7 @@ import { useEffect, useMemo, useState } from 'react'; import axios from 'axios'; import { ChevronLeft, ChevronRight, Pencil, Plus, RefreshCw, Search, Trash2, X } from 'lucide-react'; import { APP_ENDPOINTS } from '../../../config/env'; +import { LucentSelect } from '../../../components/lucent/LucentSelect'; import type { PlatformSettings, SystemSettingItem } from '../types'; import { LucentIconButton } from '../../../components/lucent/LucentIconButton'; import { useLucentPrompt } from '../../../components/lucent/LucentPromptProvider'; @@ -301,13 +302,13 @@ export function PlatformSettingsPage({ isZh }: PlatformSettingsPageProps) { setDraft((prev) => ({ ...prev, name: event.target.value }))} /> {isZh ? '类型' : 'Type'} - setDraft((prev) => ({ ...prev, value_type: event.target.value }))}> + setDraft((prev) => ({ ...prev, value_type: event.target.value }))}> string integer float boolean json - + {isZh ? '当前值' : 'Value'} {draft.value_type === 'json' ? ( diff --git a/frontend/src/modules/platform/components/UserManagementPage.tsx b/frontend/src/modules/platform/components/UserManagementPage.tsx index 41a2ea6..342b0c8 100644 --- a/frontend/src/modules/platform/components/UserManagementPage.tsx +++ b/frontend/src/modules/platform/components/UserManagementPage.tsx @@ -4,6 +4,7 @@ import { ChevronLeft, ChevronRight, Pencil, Plus, RefreshCw, Search, Trash2, Use import { APP_ENDPOINTS } from '../../../config/env'; import { LucentDrawer } from '../../../components/lucent/LucentDrawer'; import { LucentIconButton } from '../../../components/lucent/LucentIconButton'; +import { LucentSelect } from '../../../components/lucent/LucentSelect'; import { useLucentPrompt } from '../../../components/lucent/LucentPromptProvider'; import type { BotState } from '../../../types/bot'; import type { SysRoleSummary, SysUserSummary } from '../../../types/sys'; @@ -431,8 +432,7 @@ export function UserManagementPage({ isZh }: UserManagementPageProps) { {isZh ? '所属角色' : 'Role'} - setDraft((prev) => ({ ...prev, role_id: Number(event.target.value || 0) }))} > @@ -442,7 +442,7 @@ export function UserManagementPage({ isZh }: UserManagementPageProps) { {role.name} ))} - + {isZh ? 'Bot 绑定' : 'Bot Bindings'} diff --git a/frontend/src/modules/platform/components/node-home/NodeEditorDrawer.tsx b/frontend/src/modules/platform/components/node-home/NodeEditorDrawer.tsx index 78c1ef8..8487652 100644 --- a/frontend/src/modules/platform/components/node-home/NodeEditorDrawer.tsx +++ b/frontend/src/modules/platform/components/node-home/NodeEditorDrawer.tsx @@ -1,5 +1,6 @@ import { ServerCog, Wifi } from 'lucide-react'; import { LucentDrawer, type LucentDrawerSize } from '../../../../components/lucent/LucentDrawer'; +import { LucentSelect } from '../../../../components/lucent/LucentSelect'; import type { ManagedNodeConnectivityResult, ManagedNodeDraft, @@ -101,19 +102,19 @@ export function NodeEditorDrawer({ {isZh ? '传输模式' : 'Transport'} - + edge - + {isZh ? '当前版本仅支持 edge 节点。' : 'Only edge nodes are supported in this version.'} {isZh ? '默认运行时' : 'Default Runtime'} - setNodeDraft((prev) => ({ ...prev, runtime_kind: event.target.value }))}> + setNodeDraft((prev) => ({ ...prev, runtime_kind: event.target.value }))}> docker native - + {isZh ? '说明:节点实际支持的运行时以 edge 上报能力为准,这里只作为默认目标/兼容回退值。' @@ -251,8 +252,7 @@ export function NodeEditorDrawer({ {isZh ? 'Native 执行沙箱' : 'Native Sandbox Mode'} - { setNativeTestResult(null); @@ -262,7 +262,7 @@ export function NodeEditorDrawer({ {isZh ? '继承当前 Bot 配置' : 'Inherit bot config'} {isZh ? '工作区沙箱(restrictToWorkspace=true)' : 'Workspace sandbox (restrictToWorkspace=true)'} {isZh ? '全权限(突破沙箱)' : 'Full access (escape sandbox)'} - + {isZh ? '该项会在 Bot 同步时写入 nanobot tools.restrictToWorkspace。full_access = false,workspace = true。'