feat: enhance identity selection by supporting sub-addressing in email options

This commit is contained in:
Linus Rath
2026-03-24 14:33:50 +01:00
parent ddb3422852
commit de26e6da2e
+10 -5
View File
@@ -943,11 +943,16 @@ export function EmailComposer({
onChange={(e) => setSelectedIdentityId(e.target.value)} onChange={(e) => setSelectedIdentityId(e.target.value)}
className="flex-1 bg-transparent text-sm text-foreground outline-none cursor-pointer hover:text-muted-foreground transition-colors min-w-0 truncate" className="flex-1 bg-transparent text-sm text-foreground outline-none cursor-pointer hover:text-muted-foreground transition-colors min-w-0 truncate"
> >
{identities.map((identity) => ( {identities.map((identity) => {
<option key={identity.id} value={identity.id}> const displayEmail = subAddressTag
{identity.name ? `${identity.name} <${identity.email}>` : identity.email} ? generateSubAddress(identity.email, subAddressTag)
</option> : identity.email;
))} return (
<option key={identity.id} value={identity.id}>
{identity.name ? `${identity.name} <${displayEmail}>` : displayEmail}
</option>
);
})}
</select> </select>
) : ( ) : (
<span className="text-sm text-foreground flex-1 truncate"> <span className="text-sm text-foreground flex-1 truncate">