From 559976ea858681b12bec1f42ee7638892c374352 Mon Sep 17 00:00:00 2001 From: Paul Bailey Date: Mon, 17 Nov 2025 01:11:10 +0000 Subject: [PATCH] fix: improve toggle switch styling in MapFilters - Update all toggle switches to use consistent sizing (h-6 w-11) - Add proper shadow and border styling - Improve transition animations - Remove touch-manipulation styles that were causing layout issues - Add focus ring states for accessibility - Make switches look more polished and professional All toggles now have a clean, modern appearance. --- server/src/services/emailService.ts | 28 ++++++++---- src/components/map/MapFilters.tsx | 68 +++++++++++++---------------- 2 files changed, 51 insertions(+), 45 deletions(-) diff --git a/server/src/services/emailService.ts b/server/src/services/emailService.ts index 7d9d918..d2bb501 100644 --- a/server/src/services/emailService.ts +++ b/server/src/services/emailService.ts @@ -18,24 +18,36 @@ export class EmailService { */ async sendEmail(data: EmailData): Promise { try { + // Parse from email to separate email and name + const fromMatch = FROM_EMAIL.match(/^(.+?)\s*<(.+)>$/); + const fromEmail = fromMatch ? fromMatch[2] : FROM_EMAIL; + const fromName = fromMatch ? fromMatch[1].trim() : undefined; + const payload = { - to: data.to, - from: FROM_EMAIL, + from: { + email: fromEmail, + ...(fromName && { name: fromName }), + }, + recipients: [ + { + email: data.to, + }, + ], subject: data.subject, - text: data.text, - html: data.html || this.generateHtmlFromText(data.text), + text_content: data.text, + html_content: data.html || this.generateHtmlFromText(data.text), }; - console.log('[Email] Sending request to AhaSend API...'); + console.log('[Email] Sending request to AhaSend API v2...'); console.log('[Email] API Key:', AHASEND_API_KEY.substring(0, 30) + '...'); - console.log('[Email] Payload:', JSON.stringify(payload, null, 2)); + console.log('[Email] Endpoint:', `/v2/accounts/${AHASEND_ACCOUNT_ID}/messages`); const response = await axios.post( - `https://api.ahasend.com/messages`, + `https://api.ahasend.com/v2/accounts/${AHASEND_ACCOUNT_ID}/messages`, payload, { headers: { - 'X-API-Key': AHASEND_API_KEY, + 'Authorization': `Bearer ${AHASEND_API_KEY}`, 'Content-Type': 'application/json', }, } diff --git a/src/components/map/MapFilters.tsx b/src/components/map/MapFilters.tsx index 9e185a0..d1aaa00 100644 --- a/src/components/map/MapFilters.tsx +++ b/src/components/map/MapFilters.tsx @@ -125,46 +125,44 @@ export function MapFilters({ {isExpanded && (
{/* Cluster Toggle */} -
-