- {view === "inbox" && archiveMailboxId && (
+ <>
+
0 ? "right-11" : "right-3",
+ ].join(" ")}
+ data-thread-quick-actions={thread.threadId}
+ >
+
+ {view === "inbox" && archiveMailboxId && (
+ {
+ event.preventDefault();
+ event.stopPropagation();
+ moveThread(thread, archiveMailboxId);
+ }}
+ className="flex h-8 w-8 items-center justify-center rounded-md text-stone-400 hover:bg-stone-200 hover:text-stone-700 dark:text-stone-500 dark:hover:bg-stone-800 dark:hover:text-stone-200"
+ >
+
+
+ )}
+ {(view === "archive" || view === "trash") && (
+ {
+ event.preventDefault();
+ event.stopPropagation();
+ void moveMessages(
+ thread.allEmails,
+ inboxId,
+ thread.allEmails.length === 1
+ ? "Restored to Inbox"
+ : `${thread.allEmails.length} messages restored to Inbox`,
+ );
+ }}
+ className="flex h-8 w-8 items-center justify-center rounded-md text-stone-400 hover:bg-stone-200 hover:text-stone-700 dark:text-stone-500 dark:hover:bg-stone-800 dark:hover:text-stone-200"
+ >
+
+
+ )}
+ {view === "archive" && trashMailboxId && (
+ {
+ event.preventDefault();
+ event.stopPropagation();
+ moveThread(thread, trashMailboxId);
+ }}
+ className="flex h-8 w-8 items-center justify-center rounded-md text-stone-400 hover:bg-stone-200 hover:text-red-600 dark:text-stone-500 dark:hover:bg-stone-800 dark:hover:text-red-400"
+ >
+
+
+ )}
+ {view === "trash" && trashMailboxId && (
+ {
+ event.preventDefault();
+ event.stopPropagation();
+ void deleteMessagesPermanently(
+ thread.allEmails.map((email) => email.id),
+ );
+ }}
+ className="flex h-8 w-8 items-center justify-center rounded-md text-stone-400 hover:bg-red-50 hover:text-red-600 dark:text-stone-500 dark:hover:bg-red-950/40 dark:hover:text-red-400"
+ >
+
+
+ )}
{
event.preventDefault();
event.stopPropagation();
- moveThread(thread, archiveMailboxId);
+ void toggleThreadReadState(thread, isUnread);
}}
className="flex h-8 w-8 items-center justify-center rounded-md text-stone-400 hover:bg-stone-200 hover:text-stone-700 dark:text-stone-500 dark:hover:bg-stone-800 dark:hover:text-stone-200"
>
-
+
- )}
- {(view === "archive" || view === "trash") && (
- {
- event.preventDefault();
- event.stopPropagation();
- void moveMessages(
- thread.allEmails,
- inboxId,
- thread.allEmails.length === 1
- ? "Restored to Inbox"
- : `${thread.allEmails.length} messages restored to Inbox`,
- );
- }}
- className="flex h-8 w-8 items-center justify-center rounded-md text-stone-400 hover:bg-stone-200 hover:text-stone-700 dark:text-stone-500 dark:hover:bg-stone-800 dark:hover:text-stone-200"
- >
-
-
- )}
- {view === "archive" && trashMailboxId && (
- {
- event.preventDefault();
- event.stopPropagation();
- moveThread(thread, trashMailboxId);
- }}
- className="flex h-8 w-8 items-center justify-center rounded-md text-stone-400 hover:bg-stone-200 hover:text-red-600 dark:text-stone-500 dark:hover:bg-stone-800 dark:hover:text-red-400"
- >
-
-
- )}
- {view === "trash" && trashMailboxId && (
+
+
+ {view === "inbox" && pinnableEmails.length > 0 && (
+ <>
+