From 9dfea188bf5d11534a6b9e5beb68a154113f8442 Mon Sep 17 00:00:00 2001 From: pewdiepie-archdaemon Date: Thu, 11 Jun 2026 12:53:39 +0900 Subject: [PATCH] Email filter: custom dropdown with SVG icons for each option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The All/Unread/Favorites/etc selector was a native as the value store (hidden via display:none). All existing 'change' listeners keep working — the picker just dispatches a change event after updating the select's value. - Renders a styled button + drop-out menu built from the select's options (preserves optgroup labels like 'Tags'). - Each option carries an SVG icon: lines for All, ringed dot for Unread, star for Favorites, empty checkbox for Undone, bell for Reminders, reply arrow for Unanswered/Reply-soon, clock for Pending, calendar-x for Stale, exclamation-triangle for Urgent, ban for Spam, newsletter and megaphone for the marketing tags. - Icons use var(--accent) so they pick up the user's theme color. - Click outside / Esc closes the menu (Esc handler is capture-phase + stopPropagation so it doesn't bubble to the modal-close listener and shut the whole email window). CSS scoped under .email-filter-picker. --- static/js/emailLibrary.js | 115 ++++++++++++++++++++++++++++++++++- static/style.css | 124 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 238 insertions(+), 1 deletion(-) diff --git a/static/js/emailLibrary.js b/static/js/emailLibrary.js index f29f798dd..1ed8f598e 100644 --- a/static/js/emailLibrary.js +++ b/static/js/emailLibrary.js @@ -819,7 +819,10 @@ export function openEmailLibrary(opts = {}) { - @@ -836,6 +839,13 @@ export function openEmailLibrary(opts = {}) { +
+ + +