diff --git a/web/src/features/dashboard/index.tsx b/web/src/features/dashboard/index.tsx index 2bc8151..2fab104 100644 --- a/web/src/features/dashboard/index.tsx +++ b/web/src/features/dashboard/index.tsx @@ -22,7 +22,7 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table'; import { Skeleton } from '@/components/ui/skeleton'; import { XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, PieChart, Pie, Cell, BarChart, Bar } from 'recharts'; -import { Mail, HardDrive, Database, Users, Inbox, Info, Search } from 'lucide-react'; +import { Mail, HardDrive, Database, Users, Inbox, Info } from 'lucide-react'; import { formatBytes, formatNumber } from '@/lib/utils'; import { useQuery } from '@tanstack/react-query'; import { get_dashboard_stats, INITIAL_DASHBOARD_STATS, TimeBucket } from '@/api/system/api'; @@ -408,14 +408,22 @@ export default function MailArchiveDashboard() { {stats!.top_senders.map((s) => ( handleQuickSearch({ from: s.key })} > - - - {s.key} + +
+
+ + {s.key} + + + + {formatNumber(s.count)} - {formatNumber(s.count)} ))} @@ -443,13 +451,21 @@ export default function MailArchiveDashboard() { {stats!.top_largest_emails.map((m, index) => ( handleQuickSearch({ text: m.subject })} > - - - {m.subject || t('dashboard.noSubject')} + +
+
+ + + {m.subject || t('dashboard.noSubject')} + + {formatBytes(m.size_bytes)} @@ -482,7 +498,7 @@ export default function MailArchiveDashboard() { return ( { if (accountId) { handleQuickSearch({ account_ids: [accountId] }); @@ -491,11 +507,19 @@ export default function MailArchiveDashboard() { } }} > - - - {acc.key} + +
+
+ + {acc.key} + + + + {formatNumber(acc.count)} - {formatNumber(acc.count)} ); })} diff --git a/web/src/features/search/mail-list-table.tsx b/web/src/features/search/mail-list-table.tsx index 697c010..3ea11ee 100755 --- a/web/src/features/search/mail-list-table.tsx +++ b/web/src/features/search/mail-list-table.tsx @@ -19,7 +19,7 @@ import { dateFnsLocaleMap, formatBytes } from "@/lib/utils" import { format, formatDistanceToNow } from "date-fns" -import { MessageSquareText, Paperclip, Search } from "lucide-react" +import { MessageSquareText, Paperclip } from "lucide-react" import { Skeleton } from "@/components/ui/skeleton" import { Checkbox } from "@/components/ui/checkbox" import { EmailEnvelope } from "@/api" @@ -93,27 +93,26 @@ export function MailListTable({ const { account_email, account_id } = row.original; return ( -
- - - {account_email} +
{ + e.stopPropagation(); + setFilter((prev: any) => ({ + ...prev, + account_ids: [account_id], + mailbox_ids: undefined + })) + }} + > +
+
+ + {account_email}
); }, - meta: { className: 'w-[150px] text-xs' }, + meta: { className: 'w-[150px]' }, minSize: 150, maxSize: 150, }, { @@ -128,22 +127,22 @@ export function MailListTable({ const visibleTags = safeTags.slice(0, 2); return ( -
- -
- +
{ + e.stopPropagation(); + setFilter((prev: any) => ({ + ...prev, + account_ids: [account_id], + mailbox_ids: [mailbox_id] + })) + }} + > +
+
+ +
+ {mailbox_name}
@@ -173,20 +172,16 @@ export function MailListTable({ const { setFilter } = useSearchMessages(); return ( -
- - +
{ + e.stopPropagation(); + setFilter((prev: Record) => ({ ...prev, from: fromEmail })) + }} + > +
+
+ {fromEmail}
@@ -204,20 +199,10 @@ export function MailListTable({ const { setFilter } = useSearchMessages(); return ( -
- {recipients.length > 0 && ( - - )} -
+
+
+ +
{recipients.map((email, index) => (