diff --git a/src/app/(public)/HomeClient.tsx b/src/app/(public)/HomeClient.tsx index b8ef9df..2049de1 100644 --- a/src/app/(public)/HomeClient.tsx +++ b/src/app/(public)/HomeClient.tsx @@ -128,7 +128,7 @@ function CliSnippet({ label, command, t }: { label: string, command: string, t: ); } -function OsGuideContent({ title, steps, selectedOs, certificates, t }: { title: string, steps: string[], selectedOs: string, certificates: CaCertificate[], t: any }) { +function OsGuideContent({ title, steps, selectedOs, certificates, t, linuxDistro, setLinuxDistro }: { title: string, steps: string[], selectedOs: string, certificates: CaCertificate[], t: any, linuxDistro?: string, setLinuxDistro?: (distro: any) => void }) { return (
@@ -171,11 +171,43 @@ function OsGuideContent({ title, steps, selectedOs, certificates, t }: { title: {(selectedOs === 'linux' || selectedOs === 'windows' || selectedOs === 'macos') && (
{(selectedOs === 'linux') && ( - +
+
+ + + + +
+ + {linuxDistro === 'debian' && ( + + )} + {linuxDistro === 'rhel' && ( + + )} + {linuxDistro === 'arch' && ( + + )} + {linuxDistro === 'other' && ( + + )} +
)} {(selectedOs === 'windows' || selectedOs === 'macos') && (
@@ -232,7 +264,7 @@ function OsGuideContent({ title, steps, selectedOs, certificates, t }: { title: ); } -function CaCard({ cert, isRoot, t, selectedOs, setSelectedOs }: { cert: CaCertificate, isRoot: boolean, t: any, selectedOs: string, setSelectedOs: (os: any) => void }) { +function CaCard({ cert, isRoot, t, selectedOs, setSelectedOs, linuxDistro, setLinuxDistro }: { cert: CaCertificate, isRoot: boolean, t: any, selectedOs: string, setSelectedOs: (os: any) => void, linuxDistro?: string, setLinuxDistro?: (distro: any) => void }) { return (
{/* Sync Status Badge */} @@ -310,6 +342,30 @@ function CaCard({ cert, isRoot, t, selectedOs, setSelectedOs }: { cert: CaCertif variant="gray" isFullWidth /> + + {selectedOs === 'linux' && setLinuxDistro && ( +
+
+ + + + +
+ + {linuxDistro === 'debian' && ( + + )} + {linuxDistro === 'rhel' && ( + + )} + {linuxDistro === 'arch' && ( + + )} + {linuxDistro === 'other' && ( + + )} +
+ )}
)}
@@ -392,6 +448,7 @@ export default function HomeClient() { const [certificates, setCertificates] = useState([]); const [loadingCerts, setLoadingCerts] = useState(true); const [selectedOs, setSelectedOs] = useState<'windows' | 'macos' | 'linux' | 'mobile'>('windows'); + const [linuxDistro, setLinuxDistro] = useState<'debian' | 'rhel' | 'arch' | 'other'>('debian'); useEffect(() => { const fetchCertificates = async () => { @@ -577,7 +634,7 @@ export default function HomeClient() {
{familyCerts.filter(c => c.type === 'root').map((cert) => ( - + ))}
@@ -592,7 +649,7 @@ export default function HomeClient() {
{familyCerts.filter(c => c.type !== 'root').map((cert) => ( - + ))}
@@ -616,7 +673,7 @@ export default function HomeClient() {
{selectedOs === 'windows' && } {selectedOs === 'macos' && } - {selectedOs === 'linux' && } + {selectedOs === 'linux' && } {selectedOs === 'mobile' && }