From 6ffe348ac05deb978f4b5505537d041d0335e3fc Mon Sep 17 00:00:00 2001 From: MarkLo Date: Wed, 3 Dec 2025 02:59:12 +0800 Subject: [PATCH] --- .../components/analysis/DownloadReports.tsx | 58 ++++++++++++------- 1 file changed, 36 insertions(+), 22 deletions(-) diff --git a/frontend/components/analysis/DownloadReports.tsx b/frontend/components/analysis/DownloadReports.tsx index 07ba03a8..709b4f7a 100644 --- a/frontend/components/analysis/DownloadReports.tsx +++ b/frontend/components/analysis/DownloadReports.tsx @@ -5,11 +5,12 @@ "use client"; import { useState } from "react"; -import { Download, FileDown } from "lucide-react"; +import { Download, FileDown, CheckIcon } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Checkbox } from "@/components/ui/checkbox"; import { Label } from "@/components/ui/label"; +import { cn } from "@/lib/utils"; interface AnalystInfo { key: string; @@ -161,30 +162,43 @@ export function DownloadReports({ {/* Analyst List */} -
- {availableAnalysts.map(analyst => ( -
- handleToggleAnalyst(analyst.key)} - /> -
- -

+

+ {availableAnalysts.map(analyst => { + const isSelected = selectedAnalysts.includes(analyst.key); + return ( +
handleToggleAnalyst(analyst.key)} + className={cn( + "relative flex cursor-pointer flex-col gap-2 rounded-lg border-2 p-4 transition-all hover:bg-accent", + isSelected + ? "border-primary bg-primary/5 text-primary" + : "border-muted-foreground/25 bg-card text-muted-foreground" + )} + > +
+
+ {isSelected && } +
+
+

+ {analyst.label} +

+
+
+

{analyst.description}

-
- ))} + ); + })}
{/* Download Button */}