A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.
style(vault): simplify empty state and keys table UI
dextmorgn65c7ba2c0126
diff --git a/flowsint-app/src/routes/_auth.dashboard.vault.tsx b/flowsint-app/src/routes/_auth.dashboard.vault.tsxindex ec9e3eb1..7ec1a825 100644--- a/flowsint-app/src/routes/_auth.dashboard.vault.tsx+++ b/flowsint-app/src/routes/_auth.dashboard.vault.tsx@@ -5,7 +5,6 @@ import { keyService } from '../api/key-service'import { Button } from '../components/ui/button'import { Input } from '../components/ui/input'import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../components/ui/card'-import { Badge } from '../components/ui/badge'import {Dialog,DialogContent,@@ -24,7 +23,7 @@ import {TableHeader,TableRow} from '../components/ui/table'-import { Loader2, Plus, Trash2, Clock, Shield, Key, Zap, Lock, Sparkles } from 'lucide-react'+import { Loader2, Plus, Trash2, KeyRound } from 'lucide-react'import { toast } from 'sonner'import { useConfirm } from '../components/use-confirm-dialog'import Loader from '@/components/loader'@@ -175,63 +174,29 @@ function VaultPage() {><div className="w-full">{keys.length === 0 ? (- <Card className="border-2 border-dashed border-primary/20 bg-gradient-to-br from-primary/5 via-background to-accent/5">- <CardContent className="flex flex-col items-center justify-center py-20 px-8">- <div className="text-center space-y-4 max-w-md">- <h3 className="text-2xl font-bold bg-gradient-to-r from-foreground to-foreground/70 bg-clip-text text-transparent">- Your Vault is Empty- </h3>- <p className="text-muted-foreground text-lg leading-relaxed">- Add your first API key to unlock the power of third-party services in your- investigations.- </p>-- <div className="flex flex-wrap justify-center gap-3 pt-4 pb-6">- <Badge- variant="secondary"- className="bg-primary/10 text-primary border-primary/20 px-4 py-2"- >- <Zap className="w-4 h-4 mr-2" />- Fast Setup- </Badge>- <Badge- variant="secondary"- className="bg-emerald-500/10 text-emerald-700 border-emerald-200/40 px-4 py-2"- >- <Lock className="w-4 h-4 mr-2" />- Encrypted- </Badge>- <Badge- variant="secondary"- className="bg-violet-500/10 text-violet-700 border-violet-200/40 px-4 py-2"- >- <Sparkles className="w-4 h-4 mr-2" />- Secure- </Badge>- </div>-- <Button onClick={() => setIsAddDialogOpen(true)}>- <Plus className="w-4 h-4 mr-2" />- Add Your First Key- </Button>- </div>- </CardContent>- </Card>+ <div className="flex flex-col items-center justify-center py-24 gap-5">+ <KeyRound className="w-12 h-12 text-muted-foreground/40" strokeWidth={1.5} />+ <div className="text-center space-y-2">+ <h3 className="text-xl font-bold text-foreground">No keys yet</h3>+ <p className="text-muted-foreground max-w-xs leading-relaxed">+ Add your first API key to use third-party services in your investigations.+ </p>+ </div>+ <Button onClick={() => setIsAddDialogOpen(true)}>+ <Plus className="w-4 h-4 mr-2" />+ Add your first key+ </Button>+ </div>) : (- <Card className="overflow-hidden border bg-gradient-to-br from-background to-muted/20">+ <Card className="overflow-hidden"><CardHeader className="border-b"><div className="flex items-center justify-between">- <CardTitle className="flex items-center gap-3 text-xl">- <div className="p-2 bg-primary rounded-lg">- <Shield className="w-5 h-5 text-white" strokeWidth={1.9} />- </div>- API Keys- </CardTitle>- <Badge variant="secondary" className="px-3 py-1">+ <CardTitle className="text-base font-semibold">API Keys</CardTitle>+ <span className="text-xs text-muted-foreground">{keys.length} {keys.length === 1 ? 'key' : 'keys'}- </Badge>+ </span></div>- <CardDescription className="text-base mt-2">+ <CardDescription>Your encrypted API keys for external services. These keys will be available for yourinvestigations.</CardDescription>@@ -239,58 +204,24 @@ function VaultPage() {<CardContent className="p-0"><Table><TableHeader>- <TableRow className="border-b bg-muted/30">- <TableHead className="py-4 px-6 text-sm font-semibold w-2/5">- <div className="flex items-center gap-2">- <Key className="w-4 h-4" />- Name- </div>- </TableHead>- <TableHead className="py-4 text-sm font-semibold w-1/3">- <div className="flex items-center gap-2">- <Clock className="w-4 h-4" />- Created- </div>- </TableHead>- <TableHead className="py-4 px-6 text-sm font-semibold text-right w-1/5">- Actions- </TableHead>+ <TableRow className="border-b bg-muted/20">+ <TableHead className="py-3 px-6 w-2/5">Name</TableHead>+ <TableHead className="py-3 w-1/3">Added</TableHead>+ <TableHead className="py-3 px-6 text-right w-1/5">Actions</TableHead></TableRow></TableHeader><TableBody>{keys.map((key: KeyType) => (- <TableRow- key={key.id}- className="group hover:bg-gradient-to-r hover:from-primary/5 hover:to-accent/5 transition-all duration-200 border-b border-border/50"- >- <TableCell className="py-5 px-6">- <div className="flex items-center gap-4">- <div className="p-2 bg-gradient-to-r from-primary/10 to-accent/10 border border-primary/20 rounded-lg group-hover:scale-110 transition-transform duration-200">- <Key className="w-4 h-4 text-primary" />- </div>- <div>- <div className="font-semibold text-foreground group-hover:text-primary transition-colors">- {key.name}- </div>- <div className="text-sm text-muted-foreground">Encrypted & Secure</div>- </div>- </div>- </TableCell>- <TableCell className="py-5">- <div className="flex items-center gap-2 text-sm">- <div className="p-1.5 bg-muted rounded-full">- <Clock className="w-3 h-3 text-muted-foreground" />- </div>- <span className="text-muted-foreground">- {new Date(key.created_at).toLocaleDateString('en-US', {- year: 'numeric',- month: 'short',- day: 'numeric'- })}- </span>- </div>+ <TableRow key={key.id} className="hover:bg-muted/30 border-b border-border/50">+ <TableCell className="py-4 px-6 font-medium">{key.name}</TableCell>+ <TableCell className="py-4 text-sm text-muted-foreground">+ {new Date(key.created_at).toLocaleDateString('en-US', {+ year: 'numeric',+ month: 'short',+ day: 'numeric'+ })}</TableCell>- <TableCell className="text-right py-5 px-6">+ <TableCell className="text-right py-4 px-6"><Buttonvariant="ghost"size="icon"