From 4cd707fadb6a30f61043f9ad8a31fc4bf17483da Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Thu, 21 Aug 2025 19:34:05 -0700 Subject: [PATCH] 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 --- apps/sim/app/manifest.ts | 4 ++-- apps/sim/components/emails/render-email.ts | 17 ++++++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/apps/sim/app/manifest.ts b/apps/sim/app/manifest.ts index 76b67a7069..728b4b5e2d 100644 --- a/apps/sim/app/manifest.ts +++ b/apps/sim/app/manifest.ts @@ -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', diff --git a/apps/sim/components/emails/render-email.ts b/apps/sim/components/emails/render-email.ts index c78de363cb..45386aa920 100644 --- a/apps/sim/components/emails/render-email.ts +++ b/apps/sim/components/emails/render-email.ts @@ -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 } }