Skip to content

Commit 4cd707f

Browse files
authored
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
1 parent f0b0742 commit 4cd707f

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

apps/sim/app/manifest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export default function manifest(): MetadataRoute.Manifest {
1111
'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.',
1212
start_url: '/',
1313
display: 'standalone',
14-
background_color: '#701FFC', // Default Sim brand primary color
15-
theme_color: '#701FFC', // Default Sim brand primary color
14+
background_color: brand.theme?.backgroundColor || '#701FFC',
15+
theme_color: brand.theme?.primaryColor || '#701FFC',
1616
icons: [
1717
{
1818
src: '/favicon/android-chrome-192x192.png',

apps/sim/components/emails/render-email.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
OTPVerificationEmail,
77
ResetPasswordEmail,
88
} from '@/components/emails'
9+
import { getBrandConfig } from '@/lib/branding/branding'
910

1011
export async function renderOTPEmail(
1112
otp: string,
@@ -91,22 +92,24 @@ export function getEmailSubject(
9192
| 'batch-invitation'
9293
| 'help-confirmation'
9394
): string {
95+
const brandName = getBrandConfig().name
96+
9497
switch (type) {
9598
case 'sign-in':
96-
return 'Sign in to Sim'
99+
return `Sign in to ${brandName}`
97100
case 'email-verification':
98-
return 'Verify your email for Sim'
101+
return `Verify your email for ${brandName}`
99102
case 'forget-password':
100-
return 'Reset your Sim password'
103+
return `Reset your ${brandName} password`
101104
case 'reset-password':
102-
return 'Reset your Sim password'
105+
return `Reset your ${brandName} password`
103106
case 'invitation':
104-
return "You've been invited to join a team on Sim"
107+
return `You've been invited to join a team on ${brandName}`
105108
case 'batch-invitation':
106-
return "You've been invited to join a team and workspaces on Sim"
109+
return `You've been invited to join a team and workspaces on ${brandName}`
107110
case 'help-confirmation':
108111
return 'Your request has been received'
109112
default:
110-
return 'Sim'
113+
return brandName
111114
}
112115
}

0 commit comments

Comments
 (0)