tarikmenguc commited on
Commit
5eefa67
·
1 Parent(s): 64c58cd

feat(web/ui): enhance dashboard page layout

Browse files
Files changed (1) hide show
  1. web/src/app/dashboard/page.tsx +13 -1
web/src/app/dashboard/page.tsx CHANGED
@@ -11,7 +11,6 @@ import {
11
  Cpu,
12
  Zap,
13
  ArrowRight,
14
- Clock,
15
  CheckCircle2,
16
  XCircle,
17
  Sparkles,
@@ -19,6 +18,7 @@ import {
19
  Bell,
20
  CreditCard,
21
  Target,
 
22
  } from "lucide-react";
23
 
24
  interface DashboardStats {
@@ -273,6 +273,18 @@ export default function DashboardPage() {
273
  {scan.leads_count} lead
274
  </span>
275
  )}
 
 
 
 
 
 
 
 
 
 
 
 
276
  <div className="flex items-center gap-1.5">
277
  {scan.status === "completed" && <CheckCircle2 className="w-4 h-4 text-green-400" />}
278
  {scan.status === "running" && <Loader2 className="w-4 h-4 text-blue-400 animate-spin" />}
 
11
  Cpu,
12
  Zap,
13
  ArrowRight,
 
14
  CheckCircle2,
15
  XCircle,
16
  Sparkles,
 
18
  Bell,
19
  CreditCard,
20
  Target,
21
+ FileDown,
22
  } from "lucide-react";
23
 
24
  interface DashboardStats {
 
273
  {scan.leads_count} lead
274
  </span>
275
  )}
276
+ {scan.status === "completed" && (
277
+ <a
278
+ href={`${process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:8000"}/api/scans/${scan.id}/pdf`}
279
+ target="_blank"
280
+ rel="noopener noreferrer"
281
+ onClick={(e) => e.stopPropagation()}
282
+ title="PDF İndir"
283
+ className="p-1.5 rounded-lg text-muted-foreground hover:text-white hover:bg-white/10 transition-all opacity-0 group-hover:opacity-100"
284
+ >
285
+ <FileDown className="w-4 h-4" />
286
+ </a>
287
+ )}
288
  <div className="flex items-center gap-1.5">
289
  {scan.status === "completed" && <CheckCircle2 className="w-4 h-4 text-green-400" />}
290
  {scan.status === "running" && <Loader2 className="w-4 h-4 text-blue-400 animate-spin" />}