Skip to content

Commit d4cb9f2

Browse files
authored
Merge pull request #595 from getmaxun/proxy-auto
feat: byop config
2 parents b05334f + ca803d9 commit d4cb9f2

File tree

2 files changed

+9
-26
lines changed

2 files changed

+9
-26
lines changed

public/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
"coming_soon": "Coming Soon - In Open Source (Basic Rotation) & Cloud (Advanced Rotation). If you don't want to manage the infrastructure, join our cloud waitlist to get early access.",
114114
"join_waitlist": "Join Maxun Cloud Waitlist",
115115
"alert": {
116-
"title": "If your proxy requires a username and password, always provide them separately from the proxy URL.",
116+
"title": "If your proxy requires a username and password, always provide them separate from the proxy URL.",
117117
"right_way": "The right way",
118118
"wrong_way": "The wrong way",
119119
"proxy_url": "Proxy URL:",

src/components/proxy/ProxyForm.tsx

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -156,18 +156,14 @@ const ProxyForm: React.FC = () => {
156156
fetchProxyConfig();
157157
}, []);
158158

159-
const theme = useThemeMode();
160-
const isDarkMode = theme.darkMode;
161-
162159
return (
163160
<>
164161
<FormContainer>
165162
<Typography variant="h6" gutterBottom component="div" style={{ marginTop: '20px' }}>
166163
{t('proxy.title')}
167164
</Typography>
168-
<Tabs value={tabIndex} onChange={handleTabChange}>
165+
<Tabs value={tabIndex} onChange={handleTabChange} style={{ marginBottom: '10px' }}>
169166
<Tab label={t('proxy.tab_standard')} />
170-
<Tab label={t('proxy.tab_rotation')} />
171167
</Tabs>
172168

173169
{tabIndex === 0 && (
@@ -197,7 +193,7 @@ const ProxyForm: React.FC = () => {
197193
</Button>
198194
</Box>
199195
) : (
200-
<Box component="form" onSubmit={handleSubmit} sx={{ maxWidth: 400, width: '100%' }}>
196+
<Box component="form" onSubmit={handleSubmit} sx={{ maxWidth: 500, width: '100%' }}>
201197
<FormControl>
202198
<TextField
203199
label={t('proxy.server_url')}
@@ -207,7 +203,11 @@ const ProxyForm: React.FC = () => {
207203
fullWidth
208204
required
209205
error={!!errors.server_url}
210-
helperText={errors.server_url || t('proxy.server_url_helper')}
206+
helperText={
207+
<span style={{ display: 'block', marginLeft: '-10px', marginTop: '5px' }}>
208+
{errors.server_url || t('proxy.server_url_helper')}
209+
</span>
210+
}
211211
/>
212212
</FormControl>
213213
<FormControl>
@@ -256,26 +256,9 @@ const ProxyForm: React.FC = () => {
256256
</Button>
257257
</Box>
258258
))}
259-
{tabIndex === 1 && (
260-
<Box sx={{ maxWidth: 400, width: '100%', textAlign: 'center', marginTop: '20px' }}>
261-
<>
262-
<Typography variant="body1" gutterBottom component="div">
263-
{t('proxy.coming_soon')}
264-
</Typography>
265-
266-
{/* <Button variant="contained" color="primary" sx={{ marginTop: '20px',backgroundColor: '#ff00c3' }}>
267-
<a style={{ color: 'white', textDecoration: 'none' }} href="https://forms.gle/hXjgqDvkEhPcaBW76">Join Maxun Cloud Waitlist</a> */}
268-
269-
<Button variant="contained" color="primary" sx={{ marginTop: '20px' }}>
270-
<a style={{ color: 'white', textDecoration: 'none' }} href="https://forms.gle/hXjgqDvkEhPcaBW76">{t('proxy.join_waitlist')}</a>
271-
272-
</Button>
273-
</>
274-
</Box>
275-
)}
276259
</FormContainer>
277260

278-
<Alert severity="info" sx={{ marginTop: '80px', marginLeft: '50px', height: '250px', width: '600px', border: '1px solid #ff00c3' }}>
261+
<Alert severity="info" sx={{ marginTop: '80px', marginLeft: '50px', height: '250px', width: '600px' }}>
279262
<AlertTitle>{t('proxy.alert.title')}</AlertTitle>
280263
<br />
281264
<b>{t('proxy.alert.right_way')}</b>

0 commit comments

Comments
 (0)