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" - /> -
-
- -