From 5ca2e600f7977f86ea6141c1c0f3591276e63e59 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Fri, 22 Nov 2024 20:41:59 +0530 Subject: [PATCH 1/6] feat: proxy form instructions (wip) --- src/components/organisms/ProxyForm.tsx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/components/organisms/ProxyForm.tsx b/src/components/organisms/ProxyForm.tsx index 29b9534c..5155fe8f 100644 --- a/src/components/organisms/ProxyForm.tsx +++ b/src/components/organisms/ProxyForm.tsx @@ -243,6 +243,26 @@ const ProxyForm: React.FC = () => { )} + + + Proxy Instructions + + + 1. Enter the Proxy Server URL in the format: http://myproxy.com:3128 or socks5://myproxy.com:3128. + + + 2. If your proxy requires authentication, toggle the "Requires Authentication?" switch and provide the username and password. + + + 3. Click "Add Proxy" to save the configuration. + + + 4. Use the "Test Proxy" button to verify if the proxy configuration is working. + + + 5. If needed, you can remove the proxy configuration using the "Remove Proxy" button. + + ); }; From 8b42bc8f5e9467d5e300e8010f0ec82e138c33b4 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Fri, 22 Nov 2024 20:42:18 +0530 Subject: [PATCH 2/6] chore: lint --- src/components/organisms/ProxyForm.tsx | 72 +++++++++++++------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/components/organisms/ProxyForm.tsx b/src/components/organisms/ProxyForm.tsx index 5155fe8f..4f448fda 100644 --- a/src/components/organisms/ProxyForm.tsx +++ b/src/components/organisms/ProxyForm.tsx @@ -145,22 +145,22 @@ const ProxyForm: React.FC = () => { {tabIndex === 0 && ( isProxyConfigured ? ( - - - - - Proxy URL - Requires Authentication - - - - - {proxy.proxy_url} - {proxy.auth ? 'Yes' : 'No'} - - -
-
+ + + + + Proxy URL + Requires Authentication + + + + + {proxy.proxy_url} + {proxy.auth ? 'Yes' : 'No'} + + +
+
@@ -237,32 +237,32 @@ const ProxyForm: React.FC = () => { 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.
)} - - Proxy Instructions - - - 1. Enter the Proxy Server URL in the format: http://myproxy.com:3128 or socks5://myproxy.com:3128. - - - 2. If your proxy requires authentication, toggle the "Requires Authentication?" switch and provide the username and password. - - - 3. Click "Add Proxy" to save the configuration. - - - 4. Use the "Test Proxy" button to verify if the proxy configuration is working. - - - 5. If needed, you can remove the proxy configuration using the "Remove Proxy" button. - - + + Proxy Instructions + + + 1. Enter the Proxy Server URL in the format: http://myproxy.com:3128 or socks5://myproxy.com:3128. + + + 2. If your proxy requires authentication, toggle the "Requires Authentication?" switch and provide the username and password. + + + 3. Click "Add Proxy" to save the configuration. + + + 4. Use the "Test Proxy" button to verify if the proxy configuration is working. + + + 5. If needed, you can remove the proxy configuration using the "Remove Proxy" button. + + ); }; From 9353f98cb3a248e5670b45221691a92b98bad63d Mon Sep 17 00:00:00 2001 From: amhsirak Date: Fri, 22 Nov 2024 20:46:56 +0530 Subject: [PATCH 3/6] feat: instructions ui --- src/components/organisms/ProxyForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/organisms/ProxyForm.tsx b/src/components/organisms/ProxyForm.tsx index 4f448fda..356e9d15 100644 --- a/src/components/organisms/ProxyForm.tsx +++ b/src/components/organisms/ProxyForm.tsx @@ -243,7 +243,7 @@ const ProxyForm: React.FC = () => { )} - + Proxy Instructions From 2813fa918adfc001bb69955731f8d1b56220ea18 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Fri, 22 Nov 2024 20:54:27 +0530 Subject: [PATCH 4/6] feat: instructions ui alignment --- src/components/organisms/ProxyForm.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/organisms/ProxyForm.tsx b/src/components/organisms/ProxyForm.tsx index 356e9d15..39e9a0f4 100644 --- a/src/components/organisms/ProxyForm.tsx +++ b/src/components/organisms/ProxyForm.tsx @@ -231,7 +231,7 @@ const ProxyForm: React.FC = () => { ))} {tabIndex === 1 && ( - + <> 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. @@ -243,7 +243,7 @@ const ProxyForm: React.FC = () => { )} - + Proxy Instructions From 1341ac5b037fe1382d57568fb9fb878b1fa7db98 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Fri, 22 Nov 2024 21:37:21 +0530 Subject: [PATCH 5/6] feat: use alert --- src/components/organisms/ProxyForm.tsx | 38 ++++++++++++-------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/src/components/organisms/ProxyForm.tsx b/src/components/organisms/ProxyForm.tsx index 39e9a0f4..cee69805 100644 --- a/src/components/organisms/ProxyForm.tsx +++ b/src/components/organisms/ProxyForm.tsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from 'react'; import { styled } from '@mui/system'; -import { TextField, Button, Switch, FormControlLabel, Box, Typography, Tabs, Tab, Table, TableContainer, TableHead, TableRow, TableBody, TableCell, Paper } from '@mui/material'; +import { Alert, AlertTitle, TextField, Button, Switch, FormControlLabel, Box, Typography, Tabs, Tab, Table, TableContainer, TableHead, TableRow, TableBody, TableCell, Paper } from '@mui/material'; import { sendProxyConfig, getProxyConfig, testProxyConfig, deleteProxyConfig } from '../../api/proxy'; import { useGlobalInfoStore } from '../../context/globalInfo'; @@ -243,26 +243,22 @@ const ProxyForm: React.FC = () => { )} - - - Proxy Instructions - - - 1. Enter the Proxy Server URL in the format: http://myproxy.com:3128 or socks5://myproxy.com:3128. - - - 2. If your proxy requires authentication, toggle the "Requires Authentication?" switch and provide the username and password. - - - 3. Click "Add Proxy" to save the configuration. - - - 4. Use the "Test Proxy" button to verify if the proxy configuration is working. - - - 5. If needed, you can remove the proxy configuration using the "Remove Proxy" button. - - + + If your proxy requires a username and password, always provide them separately from the proxy URL. +
+ The right way +
+ Proxy URL: http://proxy.com:1337 +
+ Username: myusername +
+ Password: mypassword +
+
+ The wrong way +
+ Proxy URL: http://myusername:mypassword@proxy.com:1337 +
); }; From a510f8abe6530c80670f536f7d47b9025456962e Mon Sep 17 00:00:00 2001 From: amhsirak Date: Fri, 22 Nov 2024 21:44:45 +0530 Subject: [PATCH 6/6] feat: apply border --- src/components/organisms/ProxyForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/organisms/ProxyForm.tsx b/src/components/organisms/ProxyForm.tsx index cee69805..a581144b 100644 --- a/src/components/organisms/ProxyForm.tsx +++ b/src/components/organisms/ProxyForm.tsx @@ -243,7 +243,7 @@ const ProxyForm: React.FC = () => {
)} - + If your proxy requires a username and password, always provide them separately from the proxy URL.
The right way