mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-05 12:44:22 +00:00
Replace the grouped outbound-core-fields / outbound-wireguard-fields with one file per protocol under outbounds/protocols/: vmess, vless, trojan, shadowsocks, http, socks, wireguard, freedom, blackhole, dns, loopback (+ shared server-target). Matches the prompt's 1-file-per-protocol structure (per-modal). Outbound snapshots unchanged -> no behavior change. typecheck/lint/build green.
29 lines
834 B
TypeScript
29 lines
834 B
TypeScript
import { useTranslation } from 'react-i18next';
|
|
import { Form, Input, Select } from 'antd';
|
|
|
|
import { VmessOutboundFormSettingsSchema } from '@/schemas/forms/outbound-form';
|
|
import { antdRule } from '@/utils/zodForm';
|
|
|
|
import { SECURITY_OPTIONS } from '../outbound-form-constants';
|
|
|
|
export default function VmessFields() {
|
|
const { t } = useTranslation();
|
|
return (
|
|
<>
|
|
<Form.Item
|
|
label="ID"
|
|
name={['settings', 'id']}
|
|
rules={[antdRule(VmessOutboundFormSettingsSchema.shape.id, t)]}
|
|
>
|
|
<Input placeholder="UUID" />
|
|
</Form.Item>
|
|
<Form.Item
|
|
label={t('security')}
|
|
name={['settings', 'security']}
|
|
rules={[antdRule(VmessOutboundFormSettingsSchema.shape.security, t)]}
|
|
>
|
|
<Select options={SECURITY_OPTIONS} />
|
|
</Form.Item>
|
|
</>
|
|
);
|
|
}
|