Update routes/support.py
Browse files- routes/support.py +88 -29
routes/support.py
CHANGED
@@ -187,43 +187,102 @@ async def respond_ticket(
|
|
187 |
support_data = await support_resp.json()
|
188 |
support_name = support_data[0].get("name", "Support Team")
|
189 |
|
190 |
-
# E-mail HTML atualizado
|
191 |
email_html = f"""\
|
192 |
<!DOCTYPE html>
|
193 |
<html lang="en">
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
<
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
</html>
|
222 |
"""
|
223 |
|
224 |
# Envio de e-mail
|
225 |
access_token = await get_gmail_access_token()
|
226 |
-
subject = f"
|
227 |
|
228 |
raw_message = f"""To: {user_email}
|
229 |
From: "ClosetCoach" <[email protected]>
|
|
|
187 |
support_data = await support_resp.json()
|
188 |
support_name = support_data[0].get("name", "Support Team")
|
189 |
|
190 |
+
# E-mail HTML atualizado com o novo estilo e temas de cor
|
191 |
email_html = f"""\
|
192 |
<!DOCTYPE html>
|
193 |
<html lang="en">
|
194 |
+
<head>
|
195 |
+
<meta charset="UTF-8">
|
196 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
197 |
+
<meta name="color-scheme" content="light dark">
|
198 |
+
<title>Support Email</title>
|
199 |
+
<style>
|
200 |
+
:root {{
|
201 |
+
color-scheme: light dark;
|
202 |
+
}}
|
203 |
+
|
204 |
+
@media (prefers-color-scheme: dark) {{
|
205 |
+
body {{
|
206 |
+
background-color: #121212 !important;
|
207 |
+
color: #e0e0e0 !important;
|
208 |
+
}}
|
209 |
+
.email-container {{
|
210 |
+
background-color: #1e1e1e !important;
|
211 |
+
border-color: #333333 !important;
|
212 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
|
213 |
+
}}
|
214 |
+
.divider {{
|
215 |
+
border-color: #333333 !important;
|
216 |
+
}}
|
217 |
+
.subtle-text {{
|
218 |
+
color: #a0a0a0 !important;
|
219 |
+
}}
|
220 |
+
.signature {{
|
221 |
+
background-color: #252525 !important;
|
222 |
+
}}
|
223 |
+
.footer {{
|
224 |
+
color: #848484 !important;
|
225 |
+
}}
|
226 |
+
}}
|
227 |
+
</style>
|
228 |
+
</head>
|
229 |
+
<body style="margin: 0; padding: 0; background-color: #f5f5f5; font-family: 'Helvetica Neue', Arial, sans-serif; color: #333333; line-height: 1.6;">
|
230 |
+
<table width="100%" cellpadding="0" cellspacing="0" style="max-width: 620px; margin: 0 auto; padding: 30px 15px;">
|
231 |
+
<tr>
|
232 |
+
<td>
|
233 |
+
<table class="email-container" width="100%" cellpadding="0" cellspacing="0" style="background-color: #ffffff; border-radius: 8px; overflow: hidden; border: 1px solid #e6e6e6; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);">
|
234 |
+
<tr>
|
235 |
+
<td style="padding: 30px 35px 10px; text-align: right;">
|
236 |
+
<span class="subtle-text" style="font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: #999999;">Ameddes Support</span>
|
237 |
+
</td>
|
238 |
+
</tr>
|
239 |
+
<tr>
|
240 |
+
<td style="padding: 10px 35px 25px;">
|
241 |
+
<table width="100%" cellpadding="0" cellspacing="0">
|
242 |
+
<tr>
|
243 |
+
<td class="divider" style="border-top: 1px solid #eeeeee; padding-top: 25px;">
|
244 |
+
<p style="margin-top: 0; font-size: 15px;">Hello {first_name},</p>
|
245 |
+
|
246 |
+
<p style="font-size: 15px;">My name is {support_name} from the Ameddes Support team.</p>
|
247 |
+
|
248 |
+
<p style="font-size: 15px;">Thank you for reaching out to us. We understand your frustration when encountering difficulties accessing our service.</p>
|
249 |
+
|
250 |
+
<p style="font-size: 15px;">Currently, Streamify is temporarily unavailable while we implement significant improvements. We are developing a new version of the platform that will be available soon for iOS and Android.</p>
|
251 |
+
|
252 |
+
<p style="font-size: 15px;">We're working to ensure the service returns as soon as possible, with an even better experience for you.</p>
|
253 |
+
|
254 |
+
<p style="font-size: 15px;">For updates, follow us on Instagram: @ameddesbrasil</p>
|
255 |
+
|
256 |
+
<p style="font-size: 15px;">I'm available if you need any additional information.</p>
|
257 |
+
</td>
|
258 |
+
</tr>
|
259 |
+
</table>
|
260 |
+
</td>
|
261 |
+
</tr>
|
262 |
+
<tr>
|
263 |
+
<td class="signature" style="background-color: #f9f9f9; padding: 25px 35px;">
|
264 |
+
<p style="margin: 0; font-size: 15px;">Best regards,</p>
|
265 |
+
<p style="margin: 4px 0 0; font-size: 15px;">{support_name}</p>
|
266 |
+
<p class="subtle-text" style="margin: 3px 0 0; font-size: 13px; color: #777777;">User Support Specialist</p>
|
267 |
+
<p class="subtle-text" style="margin: 0; font-size: 13px; color: #777777;">Ameddes</p>
|
268 |
+
</td>
|
269 |
+
</tr>
|
270 |
+
<tr>
|
271 |
+
<td class="footer" style="padding: 20px 35px; font-size: 12px; color: #999999; text-align: center;">
|
272 |
+
<p style="margin: 0;">This is an automated email. Please reply directly to this message if you need further assistance.</p>
|
273 |
+
</td>
|
274 |
+
</tr>
|
275 |
+
</table>
|
276 |
+
</td>
|
277 |
+
</tr>
|
278 |
+
</table>
|
279 |
+
</body>
|
280 |
</html>
|
281 |
"""
|
282 |
|
283 |
# Envio de e-mail
|
284 |
access_token = await get_gmail_access_token()
|
285 |
+
subject = f"Support – Case {payload.ticket_id}"
|
286 |
|
287 |
raw_message = f"""To: {user_email}
|
288 |
From: "ClosetCoach" <[email protected]>
|