From ab563f81fa96b81c2330fa35a187157fba7e3955 Mon Sep 17 00:00:00 2001 From: zhom <2717306+zhom@users.noreply.github.com> Date: Wed, 11 Jun 2025 02:40:03 +0400 Subject: [PATCH] style: update proxy settings form to match proxy-settings-dialog --- src/components/create-profile-dialog.tsx | 37 ++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/src/components/create-profile-dialog.tsx b/src/components/create-profile-dialog.tsx index 2eba2fd..c2988f7 100644 --- a/src/components/create-profile-dialog.tsx +++ b/src/components/create-profile-dialog.tsx @@ -72,6 +72,8 @@ export function CreateProfileDialog({ const [proxyType, setProxyType] = useState("http"); const [proxyHost, setProxyHost] = useState(""); const [proxyPort, setProxyPort] = useState(8080); + const [proxyUsername, setProxyUsername] = useState(""); + const [proxyPassword, setProxyPassword] = useState(""); const { availableVersions, @@ -194,6 +196,8 @@ export function CreateProfileDialog({ proxy_type: proxyType, host: proxyHost, port: proxyPort, + username: proxyUsername || undefined, + password: proxyPassword || undefined, } : undefined; @@ -210,6 +214,8 @@ export function CreateProfileDialog({ setProxyEnabled(false); setProxyHost(""); setProxyPort(8080); + setProxyUsername(""); + setProxyPassword(""); onClose(); } catch (error) { console.error("Failed to create profile:", error); @@ -231,12 +237,12 @@ export function CreateProfileDialog({ return ( - - + + Create New Profile -
+
{/* Profile Name */}
@@ -414,6 +420,31 @@ export function CreateProfileDialog({ max="65535" />
+ +
+ + { + setProxyUsername(e.target.value); + }} + placeholder="Proxy username" + /> +
+ +
+ + { + setProxyPassword(e.target.value); + }} + placeholder="Proxy password" + /> +
)}