improvement(emails): fixed email subjects to use provided brand name (#1090)

* improvement(emails): fixed email subjects to use provided brand name

* update manifest to use dynamic background & theme color
This commit is contained in:
Waleed Latif
2025-08-21 19:34:05 -07:00
committed by GitHub
parent f0b07428bc
commit 4cd707fadb
2 changed files with 12 additions and 9 deletions

View File

@@ -11,8 +11,8 @@ export default function manifest(): MetadataRoute.Manifest {
'Build and deploy AI agents using our Figma-like canvas. Build, write evals, and deploy AI agent workflows that automate workflows and streamline your business processes.',
start_url: '/',
display: 'standalone',
background_color: '#701FFC', // Default Sim brand primary color
theme_color: '#701FFC', // Default Sim brand primary color
background_color: brand.theme?.backgroundColor || '#701FFC',
theme_color: brand.theme?.primaryColor || '#701FFC',
icons: [
{
src: '/favicon/android-chrome-192x192.png',

View File

@@ -6,6 +6,7 @@ import {
OTPVerificationEmail,
ResetPasswordEmail,
} from '@/components/emails'
import { getBrandConfig } from '@/lib/branding/branding'
export async function renderOTPEmail(
otp: string,
@@ -91,22 +92,24 @@ export function getEmailSubject(
| 'batch-invitation'
| 'help-confirmation'
): string {
const brandName = getBrandConfig().name
switch (type) {
case 'sign-in':
return 'Sign in to Sim'
return `Sign in to ${brandName}`
case 'email-verification':
return 'Verify your email for Sim'
return `Verify your email for ${brandName}`
case 'forget-password':
return 'Reset your Sim password'
return `Reset your ${brandName} password`
case 'reset-password':
return 'Reset your Sim password'
return `Reset your ${brandName} password`
case 'invitation':
return "You've been invited to join a team on Sim"
return `You've been invited to join a team on ${brandName}`
case 'batch-invitation':
return "You've been invited to join a team and workspaces on Sim"
return `You've been invited to join a team and workspaces on ${brandName}`
case 'help-confirmation':
return 'Your request has been received'
default:
return 'Sim'
return brandName
}
}