diff --git a/frontend/src/pages/xray/outbounds/OutboundFormModal.tsx b/frontend/src/pages/xray/outbounds/OutboundFormModal.tsx index af65ede0..6435ea48 100644 --- a/frontend/src/pages/xray/outbounds/OutboundFormModal.tsx +++ b/frontend/src/pages/xray/outbounds/OutboundFormModal.tsx @@ -62,9 +62,8 @@ import { newStreamSlice, } from './outbound-form-helpers'; import { OutboundCoreProtocolFields } from './outbound-core-fields'; -import { OutboundOnlyProtocolFields } from './outbound-only-fields'; -import { FreedomOutboundFields } from './outbound-freedom-fields'; import { WireguardOutboundFields } from './outbound-wireguard-fields'; +import { BlackholeFields, DnsFields, FreedomFields, LoopbackFields } from './protocols'; import './OutboundFormModal.css'; // Pattern A rewrite of OutboundFormModal. Built as a sibling `.new.tsx` @@ -391,9 +390,11 @@ export default function OutboundFormModal({ - + {protocol === 'loopback' && } + {protocol === 'blackhole' && } + {protocol === 'dns' && } - {protocol === 'freedom' && } + {protocol === 'freedom' && } {protocol === 'vless' && ( diff --git a/frontend/src/pages/xray/outbounds/outbound-only-fields.tsx b/frontend/src/pages/xray/outbounds/outbound-only-fields.tsx deleted file mode 100644 index e491a796..00000000 --- a/frontend/src/pages/xray/outbounds/outbound-only-fields.tsx +++ /dev/null @@ -1,92 +0,0 @@ -import { useTranslation } from 'react-i18next'; -import { Button, Form, Input, InputNumber, Select } from 'antd'; -import { DeleteOutlined, PlusOutlined } from '@ant-design/icons'; - -import { DNSRuleActions } from '@/schemas/primitives'; - -export function OutboundOnlyProtocolFields({ protocol }: { protocol: string }) { - const { t } = useTranslation(); - return ( - <> - {protocol === 'loopback' && ( - - - - )} - - {protocol === 'blackhole' && ( - - - - - - - - - - - - - - {(fields, { add, remove }) => ( - <> - -