feat: bulk actions for email lists
Select multiple rows (checkbox per row) in FolderView, SearchResults, and the Senders email panel. A toolbar appears with mark read/unread, star, archive, and trash, applied to the whole selection via CleanupService.ExecuteAsync (already scoped to UserId). Shared via useSelection hook and BulkToolbar component to avoid duplicating selection state across the three list views. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,7 @@ const fmtSize = (b) => {
|
||||
return `${(b / 1048576).toFixed(1)} MB`;
|
||||
};
|
||||
|
||||
export default function EmailRow({ email: initial, onRemove }) {
|
||||
export default function EmailRow({ email: initial, onRemove, selected, onToggleSelect }) {
|
||||
const [email, setEmail] = useState(initial);
|
||||
const [acting, setActing] = useState(false);
|
||||
|
||||
@@ -72,6 +72,11 @@ export default function EmailRow({ email: initial, onRemove }) {
|
||||
onClick={openInGmail}
|
||||
title="Open in Gmail"
|
||||
>
|
||||
{onToggleSelect && (
|
||||
<td className="el-select" onClick={(e) => e.stopPropagation()}>
|
||||
<input type="checkbox" checked={!!selected} onChange={() => onToggleSelect(email.id)} />
|
||||
</td>
|
||||
)}
|
||||
<td className="el-unread">{email.isUnread && <span className="unread-dot" />}</td>
|
||||
<td className="el-sender" title={email.senderAddress}>
|
||||
{email.senderDisplayName || email.senderAddress}
|
||||
|
||||
Reference in New Issue
Block a user