ui enhancement
This commit is contained in:
parent
78aac5a925
commit
45e3898acb
4 changed files with 175 additions and 91 deletions
|
|
@ -29,6 +29,7 @@ import {
|
|||
categoryCounts,
|
||||
emailCategory,
|
||||
inboxIntelligence,
|
||||
labelCounts,
|
||||
matchesLens,
|
||||
} from "../utils/inboxSignals";
|
||||
|
||||
|
|
@ -49,6 +50,7 @@ export default function MailboxView({
|
|||
refreshKey = 0,
|
||||
account,
|
||||
lens = "all",
|
||||
agentNav = null,
|
||||
onLogout,
|
||||
onOpenSettings,
|
||||
onStats,
|
||||
|
|
@ -135,6 +137,8 @@ export default function MailboxView({
|
|||
unread: emails.filter((email) => email.is_read === false).length,
|
||||
starred: emails.filter((email) => email.is_starred).length,
|
||||
important: intel.important,
|
||||
drafts: 0,
|
||||
labels: labelCounts(emails),
|
||||
});
|
||||
}, [emails, onStats]);
|
||||
|
||||
|
|
@ -263,6 +267,21 @@ export default function MailboxView({
|
|||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (!agentNav || status.loading) return;
|
||||
if (agentNav === "integrations") {
|
||||
setAgentFocus("Connect CRM, calendar, and billing tools from Integrations.");
|
||||
return;
|
||||
}
|
||||
if (agentNav === "ask" || agentNav === "summaries") {
|
||||
runQuickAction("summarize");
|
||||
return;
|
||||
}
|
||||
if (agentNav === "actions") {
|
||||
runQuickAction("actions");
|
||||
}
|
||||
}, [agentNav, status.loading, listedEmails.length, category]);
|
||||
|
||||
async function toggleRead(isRead) {
|
||||
if (!detail) return;
|
||||
setDetailStatus((current) => ({ ...current, busy: true, error: "" }));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue