From cc8195209bb9c9942f42b32b7626a43e2aa8c2a8 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Wed, 11 Mar 2026 22:42:21 +0100 Subject: [PATCH] feat: add toolbar position setting and update email viewer layout - Introduced a new setting for toolbar position in appearance settings, allowing users to choose between 'top' and 'below-subject'. - Updated the EmailViewer component to conditionally render the toolbar based on the selected position. - Enhanced the UI for the toolbar with action buttons for replying, archiving, and deleting emails. - Added translations for the new toolbar position setting in multiple languages. --- components/email/email-viewer.tsx | 761 ++++++++++++-------- components/settings/appearance-settings.tsx | 16 +- locales/de/common.json | 6 + locales/en/common.json | 6 + locales/es/common.json | 6 + locales/fr/common.json | 6 + locales/it/common.json | 6 + locales/ja/common.json | 6 + locales/nl/common.json | 6 + locales/pt/common.json | 6 + stores/settings-store.ts | 8 + 11 files changed, 524 insertions(+), 309 deletions(-) diff --git a/components/email/email-viewer.tsx b/components/email/email-viewer.tsx index 3ea28d0b..162f2443 100644 --- a/components/email/email-viewer.tsx +++ b/components/email/email-viewer.tsx @@ -20,7 +20,6 @@ import { ChevronUp, ChevronLeft, Download, - Paperclip, Mail, Clock, Loader2, @@ -417,6 +416,7 @@ export function EmailViewer({ const addTrustedSender = useSettingsStore((state) => state.addTrustedSender); const isSenderTrusted = useSettingsStore((state) => state.isSenderTrusted); const emailKeywords = useSettingsStore((state) => state.emailKeywords); + const toolbarPosition = useSettingsStore((state) => state.toolbarPosition); // Detect if current mailbox is Junk folder const isInJunkFolder = currentMailboxRole === 'junk'; @@ -899,15 +899,229 @@ export function EmailViewer({ )} - {/* Subject Bar - sticky on mobile/tablet for quick actions */} + {/* === TOOLBAR (top position) === */} + {toolbarPosition === 'top' && ( +
- {t('view_source')}
-
+ {t('view_source')}