From c555973b6b722db4e1b6dd4863ab30d9787b84eb Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Fri, 1 May 2026 01:42:06 +0200 Subject: [PATCH] feat: configurable sub-addressing delimiter #239 --- components/email/email-composer.tsx | 9 +-- components/email/email-identity-badge.tsx | 10 +-- components/identity/sub-address-helper.tsx | 6 +- components/settings/composing-settings.tsx | 21 +++++- lib/__tests__/sub-addressing.test.ts | 74 ++++++++++++++++++++++ lib/sub-addressing.ts | 50 +++++++++++---- locales/cs/common.json | 7 +- locales/de/common.json | 7 +- locales/en/common.json | 7 +- locales/es/common.json | 7 +- locales/fr/common.json | 7 +- locales/it/common.json | 7 +- locales/ja/common.json | 7 +- locales/ko/common.json | 7 +- locales/lv/common.json | 7 +- locales/nl/common.json | 7 +- locales/pl/common.json | 7 +- locales/pt/common.json | 7 +- locales/ru/common.json | 7 +- locales/tr/common.json | 7 +- locales/uk/common.json | 7 +- locales/zh/common.json | 7 +- stores/settings-store.ts | 11 ++++ 23 files changed, 252 insertions(+), 41 deletions(-) diff --git a/components/email/email-composer.tsx b/components/email/email-composer.tsx index 7cf32b07..350a182c 100644 --- a/components/email/email-composer.tsx +++ b/components/email/email-composer.tsx @@ -124,6 +124,7 @@ export function EmailComposer({ const tCommon = useTranslations('common'); const timeFormat = useSettingsStore((state) => state.timeFormat); const plainTextMode = useSettingsStore((state) => state.plainTextMode); + const subAddressDelimiter = useSettingsStore((state) => state.subAddressDelimiter); const autoSelectReplyIdentity = useSettingsStore((state) => state.autoSelectReplyIdentity); const attachmentReminderEnabled = useSettingsStore((state) => state.attachmentReminderEnabled); const attachmentReminderKeywords = useSettingsStore((state) => state.attachmentReminderKeywords); @@ -729,7 +730,7 @@ export function EmailComposer({ // Generate sub-addressed email if tag is set const fromEmail = currentIdentity?.email ? subAddressTag - ? generateSubAddress(currentIdentity.email, subAddressTag) + ? generateSubAddress(currentIdentity.email, subAddressTag, subAddressDelimiter) : currentIdentity.email : undefined; @@ -906,7 +907,7 @@ export function EmailComposer({ const fromEmail = currentIdentity?.email ? subAddressTag - ? generateSubAddress(currentIdentity.email, subAddressTag) + ? generateSubAddress(currentIdentity.email, subAddressTag, subAddressDelimiter) : currentIdentity.email : undefined; @@ -1215,7 +1216,7 @@ export function EmailComposer({ > {identities.map((identity) => { const displayEmail = subAddressTag - ? generateSubAddress(identity.email, subAddressTag) + ? generateSubAddress(identity.email, subAddressTag, subAddressDelimiter) : identity.email; return (