feat: implement tagging functionality for emails with drag-and-drop support

This commit is contained in:
Linus Rath
2026-03-12 03:10:40 +01:00
parent d8b0f013e8
commit bb40326809
14 changed files with 426 additions and 26 deletions
+23
View File
@@ -105,6 +105,8 @@ export default function Home() {
clearSearchFilters,
toggleAdvancedSearch,
advancedSearch,
selectedKeyword,
selectKeyword,
} = useEmailStore();
// Keyboard shortcuts handlers
@@ -594,6 +596,25 @@ export default function Home() {
}
};
const handleTagSelect = async (keywordId: string | null) => {
selectKeyword(keywordId);
// On mobile, close sidebar and go to list view
if (isMobile) {
setSidebarOpen(false);
setActiveView("list");
}
// On tablet, show the list again
if (isTablet) {
setTabletListVisible(true);
}
if (client) {
await fetchEmails(client);
}
};
const handleLogout = () => {
logout();
router.push('/login');
@@ -852,7 +873,9 @@ export default function Home() {
<Sidebar
mailboxes={mailboxes}
selectedMailbox={selectedMailbox}
selectedKeyword={selectedKeyword}
onMailboxSelect={handleMailboxSelect}
onTagSelect={handleTagSelect}
onCompose={() => {
setComposerMode('compose');
setShowComposer(true);