A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.
feat(app): update homepage styles
dextmorgn1608f4ca8746
diff --git a/flowsint-app/src/components/dashboard/investigation/investigations-list.tsx b/flowsint-app/src/components/dashboard/investigation/investigations-list.tsxindex 9726dbc4..caa07d40 100644--- a/flowsint-app/src/components/dashboard/investigation/investigations-list.tsx+++ b/flowsint-app/src/components/dashboard/investigation/investigations-list.tsx@@ -1,31 +1,42 @@-import { FolderOpen, MoreHorizontal, FileText, Network } from "lucide-react"-import { cn } from "@/lib/utils"-import { Link } from "@tanstack/react-router"-import { Investigation } from "@/types"-import { formatDistanceToNow } from "date-fns"-import { useMemo } from "react"+import { FolderOpen, MoreHorizontal, FileText, Network } from 'lucide-react'+import { cn } from '@/lib/utils'+import { Link } from '@tanstack/react-router'+import { Investigation } from '@/types'+import { formatDistanceToNow } from 'date-fns'+import { useMemo } from 'react'interface InvestigationsListProps {investigations: Investigation[]- view: "grid" | "list"- filter: "all" | "active" | "closed"- setFilter: (filter: "all" | "active" | "closed") => void- casesCount: number,+ view: 'grid' | 'list'+ filter: 'all' | 'active' | 'closed'+ setFilter: (filter: 'all' | 'active' | 'closed') => void+ casesCount: numberactiveCasesCount: numbersearch: string}-export function InvestigationsList({ investigations, view, filter, setFilter, casesCount, activeCasesCount, search }: InvestigationsListProps) {+export function InvestigationsList({+ investigations,+ view,+ filter,+ setFilter,+ casesCount,+ activeCasesCount,+ search+}: InvestigationsListProps) {const filteredInvestigations = investigations.filter((inv) => {- if (filter === "all") return inv.name.toLowerCase().includes(search.toLowerCase())+ if (filter === 'all') return inv.name.toLowerCase().includes(search.toLowerCase())return inv.status === filter && inv.name.toLowerCase().includes(search.toLowerCase())})- const filters = useMemo(() => [- { label: "All", value: "all", count: casesCount },- { label: "Active", value: "active", count: activeCasesCount },- { label: "Closed", value: "closed", count: casesCount - activeCasesCount },- ], [casesCount, activeCasesCount])+ const filters = useMemo(+ () => [+ { label: 'All', value: 'all', count: casesCount },+ { label: 'Active', value: 'active', count: activeCasesCount },+ { label: 'Closed', value: 'closed', count: casesCount - activeCasesCount }+ ],+ [casesCount, activeCasesCount]+ )return (<div>@@ -33,10 +44,12 @@ export function InvestigationsList({ investigations, view, filter, setFilter, ca{filters.map((f) => (<buttonkey={f.value}- onClick={() => setFilter(f.value as "all" | "active" | "closed")}+ onClick={() => setFilter(f.value as 'all' | 'active' | 'closed')}className={cn(- "px-3 py-1.5 text-sm rounded-md transition-colors",- filter === f.value ? "bg-muted text-foreground" : "text-muted-foreground hover:text-foreground",+ 'px-3 py-1.5 text-sm rounded-md transition-colors',+ filter === f.value+ ? 'bg-muted text-foreground'+ : 'text-muted-foreground hover:text-foreground')}>{f.label}@@ -45,23 +58,31 @@ export function InvestigationsList({ investigations, view, filter, setFilter, ca))}</div>- {view === "list" ? (+ {view === 'list' ? (<div className="border border-border rounded-lg overflow-hidden"><table className="w-full"><thead><tr className="border-b border-border bg-muted/30">- <th className="text-left text-xs font-medium text-muted-foreground px-4 py-2.5">Name</th>- <th className="text-left text-xs font-medium text-muted-foreground px-4 py-2.5 w-24">Status</th>- <th className="text-left text-xs font-medium text-muted-foreground px-4 py-2.5 w-28">Updated</th>+ <th className="text-left text-xs font-medium text-muted-foreground px-4 py-2.5">+ Name+ </th>+ <th className="text-left text-xs font-medium text-muted-foreground px-4 py-2.5 w-24">+ Status+ </th>+ <th className="text-left text-xs font-medium text-muted-foreground px-4 py-2.5 w-28">+ Updated+ </th><th className="w-10"></th></tr></thead><tbody>- {filteredInvestigations.length === 0 && <div className="flex items-center justify-center p-4">- <tr- className="border-b border-border last:border-0 hover:bg-muted/20 transition-colors group"- >No investigation found.</tr>- </div>}+ {filteredInvestigations.length === 0 && (+ <div className="flex items-center justify-center p-4">+ <tr className="border-b border-border last:border-0 hover:bg-muted/20 transition-colors group">+ No investigation found.+ </tr>+ </div>+ )}{filteredInvestigations.map((inv) => (<trkey={inv.id}@@ -77,7 +98,9 @@ export function InvestigationsList({ investigations, view, filter, setFilter, ca<FolderOpen className="w-4 h-4 text-muted-foreground shrink-0" /><div className="min-w-0"><p className="text-sm font-medium text-foreground truncate">{inv.name}</p>- <p className="text-xs text-muted-foreground truncate">{inv.description}</p>+ <p className="text-xs text-muted-foreground truncate">+ {inv.description}+ </p></div></div></Link>@@ -86,15 +109,17 @@ export function InvestigationsList({ investigations, view, filter, setFilter, ca<StatusBadge status={inv.status} /></td><td className="px-4 py-3">- <span className="text-xs text-muted-foreground">{formatDistanceToNow(new Date(inv.last_updated_at), {- addSuffix: true- })}</span>+ <span className="text-xs text-muted-foreground">+ {formatDistanceToNow(new Date(inv.last_updated_at), {+ addSuffix: true+ })}+ </span></td>- <td className="px-4 py-3">+ {/*<td className="px-4 py-3"><button className="p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity"><MoreHorizontal className="w-4 h-4 text-muted-foreground" /></button>- </td>+ </td>*/}</tr>))}</tbody>@@ -102,9 +127,7 @@ export function InvestigationsList({ investigations, view, filter, setFilter, ca</div>) : (<div className="grid grid-cols-3 gap-3">- {filteredInvestigations.length === 0 && <div>- No investigation found.- </div>}+ {filteredInvestigations.length === 0 && <div>No investigation found.</div>}{filteredInvestigations.map((inv) => (<Linkto="/dashboard/investigations/$investigationId"@@ -116,9 +139,9 @@ export function InvestigationsList({ investigations, view, filter, setFilter, ca<FolderOpen className="w-4 h-4 text-muted-foreground" /><StatusBadge status={inv.status} /></div>- <button className="p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity">+ {/*<button className="p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity"><MoreHorizontal className="w-4 h-4 text-muted-foreground" />- </button>+ </button>*/}</div><h3 className="text-sm font-medium text-foreground mb-1 truncate">{inv.name}</h3><p className="text-xs text-muted-foreground mb-4 line-clamp-2">{inv.description}</p>@@ -154,21 +177,21 @@ function StatusBadge({ status }: { status: string }) {return (<spanclassName={cn(- "inline-flex items-center gap-1.5 text-xs",- status === "active" && "text-success",- status === "closed" && "text-muted-foreground",- status === "on-hold" && "text-warning",+ 'inline-flex items-center gap-1.5 text-xs',+ status === 'active' && 'text-success',+ status === 'closed' && 'text-muted-foreground',+ status === 'on-hold' && 'text-warning')}><spanclassName={cn(- "w-1.5 h-1.5 rounded-full",- status === "active" && "bg-success",- status === "closed" && "bg-muted-foreground/50",- status === "on-hold" && "bg-warning",+ 'w-1.5 h-1.5 rounded-full',+ status === 'active' && 'bg-success',+ status === 'closed' && 'bg-muted-foreground/50',+ status === 'on-hold' && 'bg-warning')}/>- {status === "on-hold" ? "On Hold" : status.charAt(0).toUpperCase() + status.slice(1)}+ {status === 'on-hold' ? 'On Hold' : status.charAt(0).toUpperCase() + status.slice(1)}</span>)}diff --git a/flowsint-app/src/components/dashboard/overview/dashboard-header.tsx b/flowsint-app/src/components/dashboard/overview/dashboard-header.tsxindex 0e06764d..b5422351 100644--- a/flowsint-app/src/components/dashboard/overview/dashboard-header.tsx+++ b/flowsint-app/src/components/dashboard/overview/dashboard-header.tsx@@ -1,12 +1,11 @@--import { Plus, LayoutGrid, List, Search } from "lucide-react"-import { Button } from "@/components/ui/button"-import NewInvestigation from "@/components/investigations/new-investigation"-import { Input } from "@/components/ui/input"+import { Plus, LayoutGrid, List, Search } from 'lucide-react'+import { Button } from '@/components/ui/button'+import NewInvestigation from '@/components/investigations/new-investigation'+import { Input } from '@/components/ui/input'interface DashboardHeaderProps {- view: "grid" | "list"- setView: (view: "grid" | "list") => void+ view: 'grid' | 'list'+ setView: (view: 'grid' | 'list') => voidsearch: stringsetSearch: (val: string) => void}@@ -17,7 +16,9 @@ export function DashboardHeader({ view, setView, search, setSearch }: DashboardH<div className="flex items-start justify-between"><div><h1 className="text-2xl font-semibold text-foreground">Investigations</h1>- <p className="text-sm text-muted-foreground mt-1">Manage and track your OSINT investigations</p>+ <p className="text-sm text-muted-foreground mt-1">+ Manage and track your OSINT investigations+ </p></div><NewInvestigation noDropDown><Button size="sm" className="gap-1.5">@@ -31,7 +32,8 @@ export function DashboardHeader({ view, setView, search, setSearch }: DashboardH<div className="relative"><Search className="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground" /><Input- value={search} onChange={(e) => setSearch(e.target.value)}+ value={search}+ onChange={(e) => setSearch(e.target.value)}type="text"placeholder="Search investigations..."className="w-72 h-9 pl-9 pr-3 text-sm bg-muted/50 border border-border rounded-md focus:outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/60"@@ -39,20 +41,22 @@ export function DashboardHeader({ view, setView, search, setSearch }: DashboardH</div><div className="flex items-center gap-1 p-1 bg-muted/50 rounded-md"><button- onClick={() => setView("list")}- className={`p-1.5 rounded transition-colors ${view === "list"- ? "bg-background shadow-sm text-foreground"- : "text-muted-foreground hover:text-foreground"- }`}+ onClick={() => setView('list')}+ className={`p-1.5 rounded transition-colors ${+ view === 'list'+ ? 'bg-background text-foreground border'+ : 'text-muted-foreground hover:text-foreground'+ }`}><List className="w-4 h-4" /></button><button- onClick={() => setView("grid")}- className={`p-1.5 rounded transition-colors ${view === "grid"- ? "bg-background shadow-sm text-foreground"- : "text-muted-foreground hover:text-foreground"- }`}+ onClick={() => setView('grid')}+ className={`p-1.5 rounded transition-colors ${+ view === 'grid'+ ? 'bg-background text-foreground border'+ : 'text-muted-foreground hover:text-foreground'+ }`}><LayoutGrid className="w-4 h-4" /></button>diff --git a/flowsint-app/src/components/dashboard/overview/dashboard-page.tsx b/flowsint-app/src/components/dashboard/overview/dashboard-page.tsxindex df160646..09735e0d 100644--- a/flowsint-app/src/components/dashboard/overview/dashboard-page.tsx+++ b/flowsint-app/src/components/dashboard/overview/dashboard-page.tsx@@ -1,36 +1,36 @@--import { useState } from "react"-import { DashboardHeader } from "./dashboard-header"+import { useState } from 'react'+import { DashboardHeader } from './dashboard-header'// import { DashboardStats } from "./dashboard-stats"-import { InvestigationsList } from "../investigation/investigations-list"+import { InvestigationsList } from '../investigation/investigations-list'// import { RecentActivity } from "./recent-activity"-import { queryKeys } from "@/api/query-keys"-import { useQuery } from "@tanstack/react-query"-import { investigationService } from "@/api/investigation-service"-import { Investigation } from "@/types"-import { InvestigationSkeleton } from "../investigation/investigation-skeleton"+import { queryKeys } from '@/api/query-keys'+import { useQuery } from '@tanstack/react-query'+import { investigationService } from '@/api/investigation-service'+import { Investigation } from '@/types'+import { InvestigationSkeleton } from '../investigation/investigation-skeleton'export function DashboardPage() {- const [view, setView] = useState<"grid" | "list">("list")- const [filter, setFilter] = useState<"all" | "active" | "closed">("all")- const [search, setSearch] = useState<string>("")+ const [view, setView] = useState<'grid' | 'list'>('grid')+ const [filter, setFilter] = useState<'all' | 'active' | 'closed'>('all')+ const [search, setSearch] = useState<string>('')const {data: investigations,- isLoading,+ isLoading// error,// refetch} = useQuery({queryKey: queryKeys.investigations.dashboard,- queryFn: investigationService.get,+ queryFn: investigationService.get})if (isLoading) {return <InvestigationSkeleton />}- const casesCount = investigations.length ?? 0 as number- const activeCasesCount = investigations.filter((i: Investigation) => i.status === "active").length ?? 0 as number+ const casesCount = investigations.length ?? (0 as number)+ const activeCasesCount =+ investigations.filter((i: Investigation) => i.status === 'active').length ?? (0 as number)return (<main className="flex-1 h-full overflow-auto">@@ -39,7 +39,15 @@ export function DashboardPage() {{/* <DashboardStats casesCount={casesCount} activeCasesCount={activeCasesCount} /> */}<div className="mt-10 grid grid-cols-1 lg:grid-cols-3 gap-8"><div className="lg:col-span-3">- <InvestigationsList search={search} casesCount={casesCount} activeCasesCount={activeCasesCount} investigations={investigations} view={view} filter={filter} setFilter={setFilter} />+ <InvestigationsList+ search={search}+ casesCount={casesCount}+ activeCasesCount={activeCasesCount}+ investigations={investigations}+ view={view}+ filter={filter}+ setFilter={setFilter}+ /></div>{/* <div><RecentActivity />