search card ux updates

This commit is contained in:
Adamsmith6300 2025-04-11 16:54:25 -07:00
parent 30288c7552
commit 61ff1582da

View file

@ -211,6 +211,7 @@ const DashboardPage = () => {
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"> <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{searchSpaces && searchSpaces.map((space) => ( {searchSpaces && searchSpaces.map((space) => (
<Link href={`/dashboard/${space.id}/documents`}>
<motion.div <motion.div
key={space.id} key={space.id}
variants={itemVariants} variants={itemVariants}
@ -243,44 +244,39 @@ const DashboardPage = () => {
alt={space.name} alt={space.name}
className="h-full w-full object-cover grayscale duration-700 group-hover:grayscale-0" className="h-full w-full object-cover grayscale duration-700 group-hover:grayscale-0"
/> />
<div className="absolute inset-0 bg-gradient-to-t from-background/80 to-transparent" /> <div className="absolute inset-0 bg-gradient-to-t from-background/80 to-transparent" />
<div className="absolute bottom-2 left-3 flex items-center gap-2">
<Link href={`/dashboard/${space.id}/documents`}>
<span className="flex h-8 w-8 items-center justify-center rounded-full bg-blue-100/80 dark:bg-blue-950/80">
<Search className="h-4 w-4 text-blue-500" />
</span>
</Link>
</div>
<div className="absolute top-2 right-2"> <div className="absolute top-2 right-2">
<AlertDialog> <div onClick={(e) => e.preventDefault()}>
<AlertDialogTrigger asChild> <AlertDialog>
<Button <AlertDialogTrigger asChild>
variant="ghost" <Button
size="icon" variant="ghost"
className="h-8 w-8 rounded-full bg-background/50 backdrop-blur-sm hover:bg-destructive/90 hover:text-destructive-foreground" size="icon"
> className="h-8 w-8 rounded-full bg-background/50 backdrop-blur-sm hover:bg-destructive/90 cursor-pointer"
<Trash2 className="h-4 w-4" /> >
</Button> <Trash2 className="h-4 w-4" />
</AlertDialogTrigger> </Button>
<AlertDialogContent> </AlertDialogTrigger>
<AlertDialogHeader> <AlertDialogContent>
<AlertDialogTitle>Delete Search Space</AlertDialogTitle> <AlertDialogHeader>
<AlertDialogDescription> <AlertDialogTitle>Delete Search Space</AlertDialogTitle>
Are you sure you want to delete "{space.name}"? This action cannot be undone. <AlertDialogDescription>
All documents, chats, and podcasts in this search space will be permanently deleted. Are you sure you want to delete &quot;{space.name}&quot;? This action cannot be undone.
</AlertDialogDescription> All documents, chats, and podcasts in this search space will be permanently deleted.
</AlertDialogHeader> </AlertDialogDescription>
<AlertDialogFooter> </AlertDialogHeader>
<AlertDialogCancel>Cancel</AlertDialogCancel> <AlertDialogFooter>
<AlertDialogAction <AlertDialogCancel>Cancel</AlertDialogCancel>
onClick={() => handleDeleteSearchSpace(space.id)} <AlertDialogAction
className="bg-destructive hover:bg-destructive/90" onClick={() => handleDeleteSearchSpace(space.id)}
> className="bg-destructive hover:bg-destructive/90"
Delete >
</AlertDialogAction> Delete
</AlertDialogFooter> </AlertDialogAction>
</AlertDialogContent> </AlertDialogFooter>
</AlertDialog> </AlertDialogContent>
</AlertDialog>
</div>
</div> </div>
</div> </div>
@ -298,6 +294,7 @@ const DashboardPage = () => {
</Tilt> </Tilt>
</motion.div> </motion.div>
</Link>
))} ))}
{searchSpaces.length === 0 && ( {searchSpaces.length === 0 && (
@ -350,4 +347,4 @@ const DashboardPage = () => {
) )
} }
export default DashboardPage export default DashboardPage