40 lines
1.3 KiB
TypeScript
40 lines
1.3 KiB
TypeScript
"use client"
|
||
|
||
import type { CertificateDto } from "@mmapp/contracts/certificates"
|
||
|
||
|
||
function CertificateExpandedDetail({ cert }: { cert: CertificateDto }) {
|
||
return (
|
||
<div className="px-10 pb-4 grid grid-cols-2 sm:grid-cols-4 gap-4 text-xs border-t border-border/50 pt-3">
|
||
<div>
|
||
<p className="text-muted-foreground mb-1">Key size</p>
|
||
<p className="font-mono font-medium">{cert.keySize} bit</p>
|
||
</div>
|
||
<div>
|
||
<p className="text-muted-foreground mb-1">Действителен с</p>
|
||
<p className="font-mono">{cert.validFrom}</p>
|
||
</div>
|
||
<div>
|
||
<p className="text-muted-foreground mb-1">SAN / Alt Names</p>
|
||
<div className="flex flex-wrap gap-1">
|
||
{cert.sans.length > 0
|
||
? cert.sans.map((s) => (
|
||
<span key={s} className="font-mono bg-muted px-1.5 py-0.5 rounded">
|
||
{s}
|
||
</span>
|
||
))
|
||
: <span className="text-muted-foreground">—</span>}
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<p className="text-muted-foreground mb-1">Trusted</p>
|
||
<p className={cert.trusted ? "text-emerald-600 dark:text-emerald-400" : "text-red-500"}>
|
||
{cert.trusted ? "Да (доверенный)" : "Нет (не доверенный)"}
|
||
</p>
|
||
</div>
|
||
</div>
|
||
)
|
||
}
|
||
|
||
export { CertificateExpandedDetail }
|