import AppLayout from '@/Layouts/AppLayout'; import { Head } from '@inertiajs/react'; import { KeyRound, Lock, Certificate, Key, Plus, Eye, EyeOff, Copy, AlertCircle } from 'lucide-react'; import { GlassCard, StatCard } from '@/Components/ui/GlassCard'; import { StatusBadge } from '@/Components/ui/StatusBadge'; import { Button } from '@/Components/ui/Button'; import { DataTable } from '@/Components/ui/DataTable'; import { timeAgo } from '@/lib/utils'; import { useState } from 'react'; import { Tabs, TabsList, TabsTrigger, TabsContent } from '@radix-ui/react-tabs'; import { cn } from '@/lib/utils'; export default function IdentityIndex({ passwords, certificates, ssh_keys, stats }) { const [activeTab, setActiveTab] = useState('passwords'); const passwordColumns = [ { header: 'Title', accessor: 'title', render: row => (
{row.title}
{row.url &&{row.url}
}{row.domain}
{row.issuer ?? 'Self-signed'}
{daysLeft > 0 ? `${daysLeft}d left` : 'Expired'}
{new Date(row.expires_at).toLocaleDateString()}
Passwords, certificates, SSH keys, and secrets
{r.name}
}, { header: 'Algorithm', accessor: 'algorithm', render: r => {r.algorithm?.toUpperCase()} {r.key_size} }, { header: 'Fingerprint', accessor: 'fingerprint', render: r => {r.fingerprint} }, { header: '', key: 'a', render: r => }, ]} data={ssh_keys ?? []} emptyMessage="No SSH keys. Generate or import a key pair." />