Improve notification bell placement and change sender to MOPC Portal

- Move notification bell to sidebar header next to logo (desktop)
- Keep bell in mobile header bar (already well-placed)
- Change email sender name from 'MOPC Platform' to 'MOPC Portal'

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-03 22:47:24 +01:00
parent b663aae846
commit 1d137ce93e
2 changed files with 15 additions and 16 deletions

View File

@@ -30,7 +30,7 @@ async function getTransporter(): Promise<{ transporter: Transporter; from: strin
const port = db.smtp_port || process.env.SMTP_PORT || '587'
const user = db.smtp_user || process.env.SMTP_USER || ''
const pass = db.smtp_password || process.env.SMTP_PASS || ''
const from = db.email_from || process.env.EMAIL_FROM || 'MOPC Platform <noreply@monaco-opc.com>'
const from = db.email_from || process.env.EMAIL_FROM || 'MOPC Portal <noreply@monaco-opc.com>'
// Check if config changed since last call
const configHash = `${host}:${port}:${user}:${pass}:${from}`
@@ -52,7 +52,7 @@ async function getTransporter(): Promise<{ transporter: Transporter; from: strin
}
// Legacy references for backward compat — default sender from env
const defaultFrom = process.env.EMAIL_FROM || 'MOPC Platform <noreply@monaco-opc.com>'
const defaultFrom = process.env.EMAIL_FROM || 'MOPC Portal <noreply@monaco-opc.com>'
// =============================================================================
// Brand Colors & Logo URLs
@@ -248,7 +248,7 @@ interface EmailTemplate {
function getMagicLinkTemplate(url: string, expiryMinutes: number = 15): EmailTemplate {
const content = `
${sectionTitle('Sign in to your account')}
${paragraph('Click the button below to securely sign in to the MOPC Platform.')}
${paragraph('Click the button below to securely sign in to the MOPC Portal.')}
${infoBox(`<strong>This link expires in ${expiryMinutes} minutes</strong>`, 'warning')}
${ctaButton(url, 'Sign In to MOPC')}
<p style="color: ${BRAND.textMuted}; margin: 24px 0 0 0; font-size: 13px; text-align: center;">
@@ -257,10 +257,10 @@ function getMagicLinkTemplate(url: string, expiryMinutes: number = 15): EmailTem
`
return {
subject: 'Sign in to MOPC Platform',
subject: 'Sign in to MOPC Portal',
html: getEmailWrapper(content),
text: `
Sign in to MOPC Platform
Sign in to MOPC Portal
=========================
Click the link below to sign in to your account:
@@ -298,7 +298,7 @@ function getGenericInvitationTemplate(
`
return {
subject: "You're invited to join the MOPC Platform",
subject: "You're invited to join the MOPC Portal",
html: getEmailWrapper(content),
text: `
${greeting}
@@ -693,7 +693,7 @@ export async function sendTestEmail(toEmail: string): Promise<boolean> {
try {
const content = `
${sectionTitle('Test Email')}
${paragraph('This is a test email from the MOPC Platform.')}
${paragraph('This is a test email from the MOPC Portal.')}
${infoBox('If you received this, your email configuration is working correctly!', 'success')}
<p style="color: ${BRAND.textMuted}; margin: 20px 0 0 0; font-size: 13px; text-align: center;">
Sent at ${new Date().toISOString()}
@@ -704,8 +704,8 @@ export async function sendTestEmail(toEmail: string): Promise<boolean> {
await transporter.sendMail({
from,
to: toEmail,
subject: 'MOPC Platform - Test Email',
text: 'This is a test email from the MOPC Platform. If you received this, your email configuration is working correctly.',
subject: 'MOPC Portal - Test Email',
text: 'This is a test email from the MOPC Portal. If you received this, your email configuration is working correctly.',
html: getEmailWrapper(content),
})
return true
@@ -806,7 +806,7 @@ function getNotificationEmailTemplate(
</div>
${linkUrl ? ctaButton(linkUrl, 'View Details') : ''}
<p style="color: ${BRAND.textMuted}; margin: 24px 0 0 0; font-size: 13px; text-align: center;">
You received this email because of your notification preferences on the MOPC Platform.
You received this email because of your notification preferences on the MOPC Portal.
</p>
`