diff --git a/src/components/organisms/ProxyForm.tsx b/src/components/organisms/ProxyForm.tsx index ce4b565f..06199006 100644 --- a/src/components/organisms/ProxyForm.tsx +++ b/src/components/organisms/ProxyForm.tsx @@ -1,32 +1,24 @@ import React, { useState } from 'react'; -import { TextField, Button, MenuItem, Box } from '@mui/material'; +import { TextField, Button, RadioGroup, FormControlLabel, Radio, Box } from '@mui/material'; import { styled } from '@mui/system'; import axios from 'axios'; -const proxyTypes = [ - { label: 'HTTP', value: 'http' }, - { label: 'HTTPS', value: 'https' }, - { label: 'SOCKS5', value: 'socks5' }, -]; - const FormContainer = styled(Box)({ display: 'flex', flexDirection: 'column', - gap: '20px', - width: '400px', - margin: '0 auto', + gap: '16px', padding: '20px', backgroundColor: '#f9f9f9', borderRadius: '8px', }); const FormControl = styled(Box)({ - marginBottom: '10px', + marginBottom: '16px', }); const ProxyForm: React.FC = () => { const [proxyConfig, setProxyConfig] = useState({ - type: '', + type: 'http', server: '', username: '', password: '', @@ -41,7 +33,7 @@ const ProxyForm: React.FC = () => { e.preventDefault(); try { const response = await axios.post('/api/proxy', proxyConfig); - alert(`Successfully added the proxy`); + alert(`Success!`); } catch (error) { alert('Error submitting proxy configuration'); } @@ -50,48 +42,51 @@ const ProxyForm: React.FC = () => { return (
- - {proxyTypes.map((option) => ( - - {option.label} - - ))} - + + + } label="HTTP" /> + } label="HTTPS" /> + } label="SOCKS5" /> + + - + + + - + + + - + + +