Neah version mail design fix 2
This commit is contained in:
parent
a700adf8bf
commit
79b9038f50
@ -1128,7 +1128,26 @@ export default function MailPage() {
|
|||||||
</h3>
|
</h3>
|
||||||
<div className="flex items-center gap-2 text-xs text-gray-500">
|
<div className="flex items-center gap-2 text-xs text-gray-500">
|
||||||
<span className="truncate">
|
<span className="truncate">
|
||||||
{email.folder === 'INBOX' && 'Folder: INBOX'}
|
{(() => {
|
||||||
|
// Try to get clean preview text from the email body
|
||||||
|
let previewText = '';
|
||||||
|
try {
|
||||||
|
// Remove HTML tags and decode entities
|
||||||
|
previewText = email.body
|
||||||
|
.replace(/<[^>]+>/g, '') // Remove HTML tags
|
||||||
|
.replace(/ /g, ' ') // Replace with space
|
||||||
|
.replace(/\s+/g, ' ') // Normalize whitespace
|
||||||
|
.trim();
|
||||||
|
|
||||||
|
// Limit to a reasonable length
|
||||||
|
if (previewText.length > 100) {
|
||||||
|
previewText = previewText.substring(0, 100) + '...';
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
previewText = ''; // Fallback to empty string if there's an error
|
||||||
|
}
|
||||||
|
return previewText || 'No preview available';
|
||||||
|
})()}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user