From 47b6b39f3a942aee93b970031d95a952cb769d09 Mon Sep 17 00:00:00 2001 From: Luca <102960244+Luca-Timo@users.noreply.github.com> Date: Wed, 6 May 2026 01:41:45 +0200 Subject: [PATCH] feat(email): expand email palette to 8 tokens + Sync from Branding button --- backend/src/services/emailProcessor.js | 83 +++++++--- frontend/src/pages/admin/EmailConfigPage.tsx | 165 +++++++++++++------ 2 files changed, 182 insertions(+), 66 deletions(-) diff --git a/backend/src/services/emailProcessor.js b/backend/src/services/emailProcessor.js index ea4537d0..5e07f517 100644 --- a/backend/src/services/emailProcessor.js +++ b/backend/src/services/emailProcessor.js @@ -162,29 +162,52 @@ function darkenColor(hex, amount = 0.15) { // Wrap HTML body in the styled email template with header, footer, and logo async function wrapEmailHtml(htmlBody, subject, language = 'en') { - // Get branding settings for logo and email colors + // Email colour palette. The two original settings (email_primary_color and + // email_secondary_color) keep their existing semantics so emails sent by + // upgraded instances render byte-for-byte identically until an admin + // touches the new fields. The six new tokens unlock full email theming + // (body bg, container card, list panel, body text, muted text, button text) + // and default to the previously hard-coded literals when absent. let logoUrl = ''; let companyName = 'PicPeak'; let primaryColor = '#5C8762'; let secondaryColor = '#f9f9f9'; + let bodyBgColor = '#f5f5f5'; // outer wrapper + body background + let containerBgColor = '#ffffff'; // email card + let listBgColor = '#f9f9f9'; //