Neah version mail design fix 3 ????

This commit is contained in:
alma 2025-04-16 18:36:47 +02:00
parent 1e0b24e74e
commit e86d6a9e37

View File

@ -1106,7 +1106,18 @@ export default function MailPage() {
<div className="flex items-center justify-between gap-2 mb-1">
<div className="flex items-center gap-2 min-w-0">
<span className={`text-sm truncate ${!email.read ? 'font-semibold text-gray-900' : 'text-gray-600'}`}>
{currentView === 'Sent' ? email.to : (email.fromName || email.from)}
{currentView === 'Sent' ? email.to : (
(() => {
// Check if email is in format "name <email>"
const fromMatch = email.from.match(/^([^<]+)\s*<([^>]+)>$/);
if (fromMatch) {
// If we have both name and email, return just the name
return fromMatch[1].trim();
}
// If it's just an email address, return the full email
return email.from;
})()
)}
</span>
</div>
<div className="flex items-center gap-2 flex-shrink-0">