v0.2.0
parent
f20dabc58e
commit
4cb568c754
|
|
@ -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({
|
|||
<input className="input" value={draft.name} onChange={(event) => setDraft((prev) => ({ ...prev, name: event.target.value }))} />
|
||||
|
||||
<label className="field-label">{isZh ? '类型' : 'Type'}</label>
|
||||
<select className="input" value={draft.value_type} onChange={(event) => setDraft((prev) => ({ ...prev, value_type: event.target.value }))}>
|
||||
<LucentSelect value={draft.value_type} onChange={(event) => setDraft((prev) => ({ ...prev, value_type: event.target.value }))}>
|
||||
<option value="string">string</option>
|
||||
<option value="integer">integer</option>
|
||||
<option value="float">float</option>
|
||||
<option value="boolean">boolean</option>
|
||||
<option value="json">json</option>
|
||||
</select>
|
||||
</LucentSelect>
|
||||
|
||||
<label className="field-label">{isZh ? '当前值' : 'Value'}</label>
|
||||
{draft.value_type === 'json' ? (
|
||||
|
|
|
|||
|
|
@ -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) {
|
|||
<input className="input" value={draft.name} onChange={(event) => setDraft((prev) => ({ ...prev, name: event.target.value }))} />
|
||||
|
||||
<label className="field-label">{isZh ? '类型' : 'Type'}</label>
|
||||
<select className="input" value={draft.value_type} onChange={(event) => setDraft((prev) => ({ ...prev, value_type: event.target.value }))}>
|
||||
<LucentSelect value={draft.value_type} onChange={(event) => setDraft((prev) => ({ ...prev, value_type: event.target.value }))}>
|
||||
<option value="string">string</option>
|
||||
<option value="integer">integer</option>
|
||||
<option value="float">float</option>
|
||||
<option value="boolean">boolean</option>
|
||||
<option value="json">json</option>
|
||||
</select>
|
||||
</LucentSelect>
|
||||
|
||||
<label className="field-label">{isZh ? '当前值' : 'Value'}</label>
|
||||
{draft.value_type === 'json' ? (
|
||||
|
|
|
|||
|
|
@ -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) {
|
|||
</label>
|
||||
<label className="field">
|
||||
<span className="field-label">{isZh ? '所属角色' : 'Role'}</span>
|
||||
<select
|
||||
className="input"
|
||||
<LucentSelect
|
||||
value={draft.role_id || ''}
|
||||
onChange={(event) => setDraft((prev) => ({ ...prev, role_id: Number(event.target.value || 0) }))}
|
||||
>
|
||||
|
|
@ -442,7 +442,7 @@ export function UserManagementPage({ isZh }: UserManagementPageProps) {
|
|||
{role.name}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</LucentSelect>
|
||||
</label>
|
||||
<label className="field platform-node-editor-span-2">
|
||||
<span className="field-label">{isZh ? 'Bot 绑定' : 'Bot Bindings'}</span>
|
||||
|
|
|
|||
|
|
@ -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({
|
|||
</label>
|
||||
<label className="field">
|
||||
<span className="field-label">{isZh ? '传输模式' : 'Transport'}</span>
|
||||
<select className="input" value={nodeDraft.transport_kind} disabled>
|
||||
<LucentSelect value={nodeDraft.transport_kind} disabled>
|
||||
<option value="edge">edge</option>
|
||||
</select>
|
||||
</LucentSelect>
|
||||
<div className="field-label">
|
||||
{isZh ? '当前版本仅支持 edge 节点。' : 'Only edge nodes are supported in this version.'}
|
||||
</div>
|
||||
</label>
|
||||
<label className="field">
|
||||
<span className="field-label">{isZh ? '默认运行时' : 'Default Runtime'}</span>
|
||||
<select className="input" value={nodeDraft.runtime_kind} onChange={(event) => setNodeDraft((prev) => ({ ...prev, runtime_kind: event.target.value }))}>
|
||||
<LucentSelect value={nodeDraft.runtime_kind} onChange={(event) => setNodeDraft((prev) => ({ ...prev, runtime_kind: event.target.value }))}>
|
||||
<option value="docker">docker</option>
|
||||
<option value="native">native</option>
|
||||
</select>
|
||||
</LucentSelect>
|
||||
<div className="field-label">
|
||||
{isZh
|
||||
? '说明:节点实际支持的运行时以 edge 上报能力为准,这里只作为默认目标/兼容回退值。'
|
||||
|
|
@ -251,8 +252,7 @@ export function NodeEditorDrawer({
|
|||
</label>
|
||||
<label className="field">
|
||||
<span className="field-label">{isZh ? 'Native 执行沙箱' : 'Native Sandbox Mode'}</span>
|
||||
<select
|
||||
className="input"
|
||||
<LucentSelect
|
||||
value={nodeDraft.native_sandbox_mode}
|
||||
onChange={(event) => {
|
||||
setNativeTestResult(null);
|
||||
|
|
@ -262,7 +262,7 @@ export function NodeEditorDrawer({
|
|||
<option value="inherit">{isZh ? '继承当前 Bot 配置' : 'Inherit bot config'}</option>
|
||||
<option value="workspace">{isZh ? '工作区沙箱(restrictToWorkspace=true)' : 'Workspace sandbox (restrictToWorkspace=true)'}</option>
|
||||
<option value="full_access">{isZh ? '全权限(突破沙箱)' : 'Full access (escape sandbox)'}</option>
|
||||
</select>
|
||||
</LucentSelect>
|
||||
<div className="field-label">
|
||||
{isZh
|
||||
? '该项会在 Bot 同步时写入 nanobot tools.restrictToWorkspace。full_access = false,workspace = true。'
|
||||
|
|
|
|||
Loading…
Reference in New Issue