feat: enhance identity selection by supporting sub-addressing in email options
This commit is contained in:
@@ -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">
|
||||||
|
|||||||
Reference in New Issue
Block a user