From 2220e33a1eccbf9652b594caccd3420a100d56a5 Mon Sep 17 00:00:00 2001 From: jarvis2f <137974272+jarvis2f@users.noreply.github.com> Date: Tue, 7 Jan 2025 23:10:27 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20feat:=20Optimize=20UI=20componen?= =?UTF-8?q?ts=20and=20input=20logic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/proxy-ping.tsx | 4 +-- web/src/components/proxys.tsx | 43 +++++++++++++++++----------- web/src/components/settings-form.tsx | 26 +++++++++++++++-- web/src/components/ui/toaster.tsx | 4 +-- web/src/lib/types.ts | 1 + 5 files changed, 56 insertions(+), 22 deletions(-) diff --git a/web/src/components/proxy-ping.tsx b/web/src/components/proxy-ping.tsx index 3e1d874..5d2cfab 100644 --- a/web/src/components/proxy-ping.tsx +++ b/web/src/components/proxy-ping.tsx @@ -30,11 +30,11 @@ export default function ProxyPing({ accountId }: { accountId: string }) { > {isLoading && ( -
+
)} {!isLoading && error && Connection error} {!isLoading && data && ( -
+
{(data.ping * 1000).toFixed(0)} ms
)} diff --git a/web/src/components/proxys.tsx b/web/src/components/proxys.tsx index 4e69249..a02e953 100644 --- a/web/src/components/proxys.tsx +++ b/web/src/components/proxys.tsx @@ -25,6 +25,7 @@ import useSWRMutation from "swr/mutation"; import { request } from "@/lib/api"; import { toast } from "@/hooks/use-toast"; import ProxyPing from "@/components/proxy-ping"; +import { Label } from "./ui/label"; export interface ProxysProps { enableSelect?: boolean; @@ -231,34 +232,46 @@ export default function Proxys({
{/* Radio buttons for proxy type */}
- +
-
- {/* Other input fields */}
- +
-

+

+
-
-
-

- Authentication (optional) -

+
-
-