From 53ea0e74a3b6f3d07c064ba99380db0b9d814c82 Mon Sep 17 00:00:00 2001 From: Denozordec Date: Tue, 12 May 2026 20:11:22 +0700 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D0=BD=D0=BE=D0=B2=D1=8B=D0=B5=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BC=D0=BF=D0=BE=D0=BD=D0=B5=D0=BD=D1=82=D1=8B=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D1=83=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D1=81=D0=B5=D1=80=D1=82=D0=B8=D1=84=D0=B8=D0=BA=D0=B0?= =?UTF-8?q?=D1=82=D0=B0=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/(main)/certificates/page.tsx | 219 ++++++++++++++++++++----------- tsconfig.tsbuildinfo | 2 +- 2 files changed, 145 insertions(+), 76 deletions(-) diff --git a/app/(main)/certificates/page.tsx b/app/(main)/certificates/page.tsx index 2d7a097..db99095 100644 --- a/app/(main)/certificates/page.tsx +++ b/app/(main)/certificates/page.tsx @@ -93,6 +93,60 @@ function daysLeftBar(days: number, total = 365): number { return Math.min(100, Math.round((days / total) * 100)) } +function Field({ + label, + hint, + required, + children, +}: { + label: string + hint?: string + required?: boolean + children: ReactNode +}) { + return ( +
+ + {children} + {hint &&

{hint}

} +
+ ) +} + +function Toggle({ checked, onChange }: { checked: boolean; onChange: (v: boolean) => void }) { + return ( + + ) +} + +function SectionTitle({ children }: { children: ReactNode }) { + return ( +
+ {children} +
+
+ ) +} + function mockToDto(cert: (typeof routerCertificates)[number]): CertificateDto { return { id: cert.id, @@ -641,65 +695,75 @@ function CertPartIssueForm({ setIssueTrustApi: (v: boolean) => void }) { return ( -
-
- - setIssueServerId(e.target.value)} + className="h-8 w-full rounded-lg border border-input bg-background px-2.5 text-sm text-foreground outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50" + > + - ))} - -
-
- - setIssueCertName(e.target.value)} - placeholder="router-le" - /> -
-
- - setIssueCommonName(e.target.value)} - placeholder="vpn.example.com" - /> -
-
- -