feat: add email templates for login and reset password

pull/8487/head
douxc 2 years ago
parent 693fe912f2
commit 42e6bf53c2

@ -0,0 +1,74 @@
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: 'Arial', sans-serif;
line-height: 16pt;
color: #101828;
background-color: #e9ebf0;
margin: 0;
padding: 0;
}
.container {
width: 600px;
height: 360px;
margin: 40px auto;
padding: 36px 48px;
background-color: #fcfcfd;
border-radius: 16px;
border: 1px solid #ffffff;
box-shadow: 0 2px 4px -2px rgba(9, 9, 11, 0.08);
}
.header {
margin-bottom: 24px;
}
.header img {
max-width: 100px;
height: auto;
}
.title {
font-weight: 600;
font-size: 24px;
line-height: 28.8px;
}
.description {
font-size: 13px;
line-height: 16px;
color: #676f83;
margin-top: 12px;
}
.code-content {
padding: 16px 32px;
text-align: center;
border-radius: 16px;
background-color: #f2f4f7;
margin: 16px auto;
}
.code {
line-height: 36px;
font-weight: 700;
font-size: 30px;
}
.tips {
line-height: 16px;
color: #676f83;
font-size: 13px;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<!-- Optional: Add a logo or a header image here -->
<img src="https://cloud.dify.ai/logo/logo-site.png" alt="Dify Logo" />
</div>
<p class="title">Your login code for Dify</p>
<p class="description">Copy and paste this code, this code will only be valid for the next 5 minutes.</p>
<div class="code-content">
<span class="code">{{code}}</span>
</div>
<p class="tips">If you didn't request a login, don't worry. You can safely ignore this email.</p>
</div>
</body>
</html>

@ -0,0 +1,74 @@
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: 'Arial', sans-serif;
line-height: 16pt;
color: #101828;
background-color: #e9ebf0;
margin: 0;
padding: 0;
}
.container {
width: 600px;
height: 360px;
margin: 40px auto;
padding: 36px 48px;
background-color: #fcfcfd;
border-radius: 16px;
border: 1px solid #ffffff;
box-shadow: 0 2px 4px -2px rgba(9, 9, 11, 0.08);
}
.header {
margin-bottom: 24px;
}
.header img {
max-width: 100px;
height: auto;
}
.title {
font-weight: 600;
font-size: 24px;
line-height: 28.8px;
}
.description {
font-size: 13px;
line-height: 16px;
color: #676f83;
margin-top: 12px;
}
.code-content {
padding: 16px 32px;
text-align: center;
border-radius: 16px;
background-color: #f2f4f7;
margin: 16px auto;
}
.code {
line-height: 36px;
font-weight: 700;
font-size: 30px;
}
.tips {
line-height: 16px;
color: #676f83;
font-size: 13px;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<!-- Optional: Add a logo or a header image here -->
<img src="https://cloud.dify.ai/logo/logo-site.png" alt="Dify Logo" />
</div>
<p class="title">Dify 的登录验证码</p>
<p class="description">复制并粘贴此验证码,注意验证码仅在接下来的 5 分钟内有效。</p>
<div class="code-content">
<span class="code">{{code}}</span>
</div>
<p class="tips">如果您没有请求登陆,请不要担心。您可以安全地忽略此电子邮件。</p>
</div>
</body>
</html>

@ -1,72 +1,74 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<style> <style>
body { body {
font-family: 'Arial', sans-serif; font-family: 'Arial', sans-serif;
line-height: 16pt; line-height: 16pt;
color: #374151; color: #101828;
background-color: #E5E7EB; background-color: #e9ebf0;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.container { .container {
width: 100%; width: 600px;
max-width: 560px; height: 360px;
margin: 40px auto; margin: 40px auto;
padding: 20px; padding: 36px 48px;
background-color: #F3F4F6; background-color: #fcfcfd;
border-radius: 8px; border-radius: 16px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); border: 1px solid #ffffff;
} box-shadow: 0 2px 4px -2px rgba(9, 9, 11, 0.08);
.header { }
text-align: center; .header {
margin-bottom: 20px; margin-bottom: 24px;
} }
.header img { .header img {
max-width: 100px; max-width: 100px;
height: auto; height: auto;
} }
.button { .title {
display: inline-block; font-weight: 600;
padding: 12px 24px; font-size: 24px;
background-color: #2970FF; line-height: 28.8px;
color: white; }
text-decoration: none; .description {
border-radius: 4px; font-size: 13px;
text-align: center; line-height: 16px;
transition: background-color 0.3s ease; color: #676f83;
} margin-top: 12px;
.button:hover { }
background-color: #265DD4; .code-content {
} padding: 16px 32px;
.footer { text-align: center;
font-size: 0.9em; border-radius: 16px;
color: #777777; background-color: #f2f4f7;
margin-top: 30px; margin: 16px auto;
} }
.content { .code {
margin-top: 20px; line-height: 36px;
} font-weight: 700;
font-size: 30px;
}
.tips {
line-height: 16px;
color: #676f83;
font-size: 13px;
}
</style> </style>
</head> </head>
<body>
<body>
<div class="container"> <div class="container">
<div class="header"> <div class="header">
<img src="https://cloud.dify.ai/logo/logo-site.png" alt="Dify Logo"> <!-- Optional: Add a logo or a header image here -->
</div> <img src="https://cloud.dify.ai/logo/logo-site.png" alt="Dify Logo" />
<div class="content"> </div>
<p>Dear {{ to }},</p> <p class="title">Reset your Dify password</p>
<p>We have received a request to reset your password. If you initiated this request, please click the button below to reset your password:</p> <p class="description">Copy and paste this code, this code will only be valid for the next 5 minutes.</p>
<p style="text-align: center;"><a style="color: #fff; text-decoration: none" class="button" href="{{ url }}">Reset Password</a></p> <div class="code-content">
<p>If you did not request a password reset, please ignore this email and your account will remain secure.</p> <span class="code">{{code}}</span>
</div> </div>
<div class="footer"> <p class="tips">If you didn't request a reset, don't worry. You can safely ignore this email.</p>
<p>Best regards,</p>
<p>Dify Team</p>
<p>Please do not reply directly to this email; it is automatically sent by the system.</p>
</div>
</div> </div>
</body> </body>
</html> </html>

@ -1,72 +1,74 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<style> <style>
body { body {
font-family: 'Arial', sans-serif; font-family: 'Arial', sans-serif;
line-height: 16pt; line-height: 16pt;
color: #374151; color: #101828;
background-color: #E5E7EB; background-color: #e9ebf0;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.container { .container {
width: 100%; width: 600px;
max-width: 560px; height: 360px;
margin: 40px auto; margin: 40px auto;
padding: 20px; padding: 36px 48px;
background-color: #F3F4F6; background-color: #fcfcfd;
border-radius: 8px; border-radius: 16px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); border: 1px solid #ffffff;
} box-shadow: 0 2px 4px -2px rgba(9, 9, 11, 0.08);
.header { }
text-align: center; .header {
margin-bottom: 20px; margin-bottom: 24px;
} }
.header img { .header img {
max-width: 100px; max-width: 100px;
height: auto; height: auto;
} }
.button { .title {
display: inline-block; font-weight: 600;
padding: 12px 24px; font-size: 24px;
background-color: #2970FF; line-height: 28.8px;
color: white; }
text-decoration: none; .description {
border-radius: 4px; font-size: 13px;
text-align: center; line-height: 16px;
transition: background-color 0.3s ease; color: #676f83;
} margin-top: 12px;
.button:hover { }
background-color: #265DD4; .code-content {
} padding: 16px 32px;
.footer { text-align: center;
font-size: 0.9em; border-radius: 16px;
color: #777777; background-color: #f2f4f7;
margin-top: 30px; margin: 16px auto;
} }
.content { .code {
margin-top: 20px; line-height: 36px;
} font-weight: 700;
font-size: 30px;
}
.tips {
line-height: 16px;
color: #676f83;
font-size: 13px;
}
</style> </style>
</head> </head>
<body>
<body>
<div class="container"> <div class="container">
<div class="header"> <div class="header">
<img src="https://cloud.dify.ai/logo/logo-site.png" alt="Dify Logo"> <!-- Optional: Add a logo or a header image here -->
</div> <img src="https://cloud.dify.ai/logo/logo-site.png" alt="Dify Logo" />
<div class="content"> </div>
<p>尊敬的 {{ to }}</p> <p class="title">重置您的Dify密码</p>
<p>我们收到了您关于重置密码的请求。如果是您本人操作,请点击以下按钮重置您的密码:</p> <p class="description">复制并粘贴此验证码,注意验证码仅在接下来的 5 分钟内有效。</p>
<p style="text-align: center;"><a style="color: #fff; text-decoration: none" class="button" href="{{ url }}">重置密码</a></p> <div class="code-content">
<p>如果您没有请求重置密码,请忽略此邮件,您的账户信息将保持安全。</p> <span class="code">{{code}}</span>
</div> </div>
<div class="footer"> <p class="tips">如果您没有请求重置密码,请不要担心。您可以安全地忽略此电子邮件。</p>
<p>此致,</p>
<p>Dify 团队</p>
<p>请不要直接回复此电子邮件;由系统自动发送。</p>
</div>
</div> </div>
</body> </body>
</html> </html>

Loading…
Cancel
Save