feat: quick actions on email rows (read/unread, star, trash)

- EmailRow shared component with hover action buttons: mark read/unread, star/unstar, trash
- Optimistic UI — local state patches immediately on click; row fades and becomes non-interactive during the API call
- Trashed rows disappear from the current folder view via onRemove callback
- Backend: EmailController single-email endpoints (POST /email/{id}/read|unread|star|unstar|trash|untrash)
- Star/Unstar added to CleanupActionType enum and CleanupService (maps to STARRED Gmail label via BatchModifyAsync)
- UserId scope enforced in ResolveTargetsAsync — a user can only act on their own emails
- action buttons use stopPropagation so clicking them does not open Gmail

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
cesnimda
2026-06-30 20:18:44 +02:00
parent 498536451e
commit 2f6d6abdd3
8 changed files with 181 additions and 75 deletions
+12
View File
@@ -239,6 +239,18 @@ input, select { background: var(--panel-2); border: 1px solid #2c3550; color: va
.el-size { font-size: 11px; color: var(--muted); }
.el-date { width: 70px; padding: 10px 0 10px 8px; text-align: right; color: var(--muted); white-space: nowrap; font-size: 12px; }
.el-actions { width: 80px; padding: 0 6px; text-align: right; white-space: nowrap; }
.action-btn {
background: none; border: none; padding: 3px 4px; cursor: pointer;
font-size: 13px; opacity: 0; transition: opacity 0.1s, color 0.1s;
border-radius: 4px; color: var(--muted);
}
.action-btn:hover { background: var(--panel-2); opacity: 1 !important; }
.action-btn--active { opacity: 1 !important; }
.action-btn--danger:hover { color: var(--danger); }
.email-row:hover .action-btn { opacity: 0.6; }
.email-row--acting { opacity: 0.6; pointer-events: none; }
.fv-sentinel { height: 1px; }
.fv-loading-more { color: var(--muted); font-size: 13px; padding: 16px 0; text-align: center; }
.fv-end { color: var(--muted); font-size: 12px; padding: 20px 0 8px; text-align: center; }