Adiciona novos templates de e-mail para verificação, redefinição de senha e boas-vindas, além de atualizar a estrutura do projeto para incluir um novo esquema de registro de cliente e usuário. Implementa a lógica de envio de e-mails utilizando Jinja2 para renderização de templates. Atualiza o serviço de autenticação para suportar a criação de clientes com usuários associados.
This commit is contained in:
32
src/templates/emails/account_locked.html
Normal file
32
src/templates/emails/account_locked.html
Normal file
@@ -0,0 +1,32 @@
|
||||
{% extends "base_email.html" %}
|
||||
|
||||
{% block title %}Account Locked - Evo AI{% endblock %}
|
||||
|
||||
{% block header %}Evo AI - Security{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Security Alert: Your Account Has Been Locked</h2>
|
||||
<p>Hello {{ user_name }},</p>
|
||||
<p>We detected multiple failed login attempts to your account on the Evo AI platform. To protect your information, we have temporarily locked access to your account.</p>
|
||||
|
||||
<h3>What happened?</h3>
|
||||
<p>Our security system detected {{ failed_attempts }} failed login attempts with incorrect passwords in the last {{ time_period }}. This may indicate an unauthorized access attempt to your account.</p>
|
||||
|
||||
<h3>What to do now?</h3>
|
||||
<p>To unlock your account, you need to reset your password:</p>
|
||||
|
||||
<p style="text-align: center; margin-top: 30px;">
|
||||
<a href="{{ reset_link }}" class="button">Reset My Password</a>
|
||||
</p>
|
||||
|
||||
<p>The link above is valid for <strong>24 hours</strong>. If you don't reset your password within this period, you will need to request a new reset link.</p>
|
||||
|
||||
<p><strong>Important:</strong> If you haven't tried to log in recently, we recommend that you reset your password immediately and consider enabling two-factor authentication for greater security.</p>
|
||||
|
||||
<p>If you need help, please contact our support team.</p>
|
||||
|
||||
<p>Best regards,<br>
|
||||
Evo AI Security Team</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer_message %}If you don't recognize this activity, please contact support immediately.{% endblock %}
|
||||
83
src/templates/emails/base_email.html
Normal file
83
src/templates/emails/base_email.html
Normal file
@@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}Evo AI{% endblock %}</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
line-height: 1.6;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
.container {
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
background-color: #ffffff;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
||||
}
|
||||
.header {
|
||||
background-color: #4A90E2;
|
||||
color: white;
|
||||
padding: 15px;
|
||||
text-align: center;
|
||||
border-radius: 6px 6px 0 0;
|
||||
}
|
||||
.content {
|
||||
padding: 20px;
|
||||
}
|
||||
.button {
|
||||
background-color: #4A90E2;
|
||||
color: white !important;
|
||||
padding: 12px 24px;
|
||||
text-decoration: none;
|
||||
border-radius: 4px;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
.button:hover {
|
||||
background-color: #3a7bc8;
|
||||
}
|
||||
.footer {
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
margin-top: 30px;
|
||||
color: #888;
|
||||
border-top: 1px solid #eee;
|
||||
padding-top: 20px;
|
||||
}
|
||||
.link {
|
||||
word-break: break-all;
|
||||
color: #4A90E2;
|
||||
}
|
||||
.warning {
|
||||
color: #E74C3C;
|
||||
padding: 10px;
|
||||
background-color: #FADBD8;
|
||||
border-radius: 4px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
{% block additional_styles %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<h1>{% block header %}Evo AI{% endblock %}</h1>
|
||||
</div>
|
||||
<div class="content">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
<div class="footer">
|
||||
<p>{% block footer_message %}This is an automated email, please do not reply.{% endblock %}</p>
|
||||
<p>© {{ current_year }} Evo AI. All rights reserved.</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
29
src/templates/emails/password_reset.html
Normal file
29
src/templates/emails/password_reset.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{% extends "base_email.html" %}
|
||||
|
||||
{% block title %}Password Reset - Evo AI{% endblock %}
|
||||
|
||||
{% block header %}Evo AI{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Password Reset</h2>
|
||||
<p>Hello {{ user_name }},</p>
|
||||
<p>We received a request to reset the password for your account on the Evo AI platform. If you didn't request this change, please ignore this email or contact our support team if you have any questions.</p>
|
||||
|
||||
<p>To reset your password, click the button below:</p>
|
||||
|
||||
<p style="text-align: center; margin-top: 30px;">
|
||||
<a href="{{ reset_link }}" class="button">Reset My Password</a>
|
||||
</p>
|
||||
|
||||
<p>This reset link is valid for <strong>24 hours</strong>. After this period, you will need to request a new password reset.</p>
|
||||
|
||||
<p>For security reasons, after resetting your password, you will be logged out of all active sessions and will need to log in again on all devices.</p>
|
||||
|
||||
<p>If you can't click the button above, copy and paste the following URL into your browser:</p>
|
||||
<p style="word-break: break-all; font-size: 12px;">{{ reset_link }}</p>
|
||||
|
||||
<p>Best regards,<br>
|
||||
Evo AI Team</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer_message %}This is an automated email. Please do not reply to this message.{% endblock %}
|
||||
31
src/templates/emails/verification_email.html
Normal file
31
src/templates/emails/verification_email.html
Normal file
@@ -0,0 +1,31 @@
|
||||
{% extends "base_email.html" %}
|
||||
|
||||
{% block title %}Email Verification - Evo AI{% endblock %}
|
||||
|
||||
{% block header %}Evo AI{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Email Verification</h2>
|
||||
<p>Hello {{ user_name }},</p>
|
||||
<p>Thank you for registering on the Evo AI platform. To complete your registration and ensure the security of your account, we need to verify your email address.</p>
|
||||
|
||||
<p>Please click the button below to confirm your email:</p>
|
||||
|
||||
<p style="text-align: center; margin-top: 30px;">
|
||||
<a href="{{ verification_link }}" class="button">Verify My Email</a>
|
||||
</p>
|
||||
|
||||
<p>This verification link is valid for <strong>48 hours</strong>. If it expires, you can request a new verification email through our platform.</p>
|
||||
|
||||
<p>If you can't click the button above, copy and paste the following URL into your browser:</p>
|
||||
<p style="word-break: break-all; font-size: 12px;">{{ verification_link }}</p>
|
||||
|
||||
<p>If you didn't create an account on Evo AI, please ignore this email or contact our support team.</p>
|
||||
|
||||
<p>We're excited to have you as part of our community!</p>
|
||||
|
||||
<p>Best regards,<br>
|
||||
Evo AI Team</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer_message %}This is an automated email. Please do not reply to this message.{% endblock %}
|
||||
31
src/templates/emails/welcome_email.html
Normal file
31
src/templates/emails/welcome_email.html
Normal file
@@ -0,0 +1,31 @@
|
||||
{% extends "base_email.html" %}
|
||||
|
||||
{% block title %}Welcome to Evo AI{% endblock %}
|
||||
|
||||
{% block header %}Evo AI{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Welcome to the Evo AI Platform!</h2>
|
||||
<p>Hello {{ user_name }},</p>
|
||||
<p>We're thrilled to have you as part of our community. Your account has been successfully verified and you can now start using all the features of our platform.</p>
|
||||
|
||||
<h3>Next steps:</h3>
|
||||
<ul>
|
||||
<li>Set up your complete profile</li>
|
||||
<li>Explore our AI capabilities</li>
|
||||
<li>Create your first intelligent agent</li>
|
||||
</ul>
|
||||
|
||||
<p style="text-align: center; margin-top: 30px;">
|
||||
<a href="{{ dashboard_link }}" class="button">Access My Dashboard</a>
|
||||
</p>
|
||||
|
||||
<p>If you have any questions or need assistance, our support team is available to help you.</p>
|
||||
|
||||
<p>Make the most of the power of Evo AI!</p>
|
||||
|
||||
<p>Best regards,<br>
|
||||
Evo AI Team</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer_message %}This is an automated email. Please do not reply to this message. For support, use our help center.{% endblock %}
|
||||
Reference in New Issue
Block a user