63 lines
2.5 KiB
TypeScript
63 lines
2.5 KiB
TypeScript
import { Language } from '../types'
|
|
|
|
interface PasswordResetTemplateData {
|
|
name: string
|
|
resetLink: string
|
|
expiresIn: string
|
|
}
|
|
|
|
const en = {
|
|
html: (data: PasswordResetTemplateData) => `
|
|
<h1>Password Reset Request</h1>
|
|
<p>Hello ${data.name},</p>
|
|
<p>We received a request to reset your password. Click the link below to create a new password:</p>
|
|
<a href="${data.resetLink}" style="display: inline-block; background: #007bff; color: white; padding: 10px 20px; text-decoration: none; border-radius: 5px; margin: 15px 0;">Reset Password</a>
|
|
<p>This link will expire in ${data.expiresIn}.</p>
|
|
<p>If you didn't request this password reset, please ignore this email or contact support if you have concerns.</p>
|
|
<p>Best regards,<br>Your Support Team</p>
|
|
`,
|
|
text: (data: PasswordResetTemplateData) => `
|
|
Password Reset Request
|
|
|
|
Hello ${data.name},
|
|
|
|
We received a request to reset your password. Use the following link to create a new password:
|
|
${data.resetLink}
|
|
|
|
This link will expire in ${data.expiresIn}.
|
|
|
|
If you didn't request this password reset, please ignore this email or contact support if you have concerns.
|
|
|
|
Best regards,
|
|
Your Support Team
|
|
`
|
|
}
|
|
|
|
const de = {
|
|
html: (data: PasswordResetTemplateData) => `
|
|
<h1>Anfrage zum Zurücksetzen des Passworts</h1>
|
|
<p>Hallo ${data.name},</p>
|
|
<p>Wir haben eine Anfrage zum Zurücksetzen Ihres Passworts erhalten. Klicken Sie auf den untenstehenden Link, um ein neues Passwort zu erstellen:</p>
|
|
<a href="${data.resetLink}" style="display: inline-block; background: #007bff; color: white; padding: 10px 20px; text-decoration: none; border-radius: 5px; margin: 15px 0;">Passwort zurücksetzen</a>
|
|
<p>Dieser Link läuft in ${data.expiresIn} ab.</p>
|
|
<p>Falls Sie diese Anfrage nicht gestellt haben, ignorieren Sie bitte diese E-Mail oder kontaktieren Sie den Support, wenn Sie Bedenken haben.</p>
|
|
<p>Mit freundlichen Grüßen,<br>Ihr Support-Team</p>
|
|
`,
|
|
text: (data: PasswordResetTemplateData) => `
|
|
Anfrage zum Zurücksetzen des Passworts
|
|
|
|
Hallo ${data.name},
|
|
|
|
Wir haben eine Anfrage zum Zurücksetzen Ihres Passworts erhalten. Verwenden Sie den folgenden Link, um ein neues Passwort zu erstellen:
|
|
${data.resetLink}
|
|
|
|
Dieser Link läuft in ${data.expiresIn} ab.
|
|
|
|
Falls Sie diese Anfrage nicht gestellt haben, ignorieren Sie bitte diese E-Mail oder kontaktieren Sie den Support, wenn Sie Bedenken haben.
|
|
|
|
Mit freundlichen Grüßen,
|
|
Ihr Support-Team
|
|
`
|
|
}
|
|
|
|
export const passwordResetTemplate: Record<Language, typeof en> = { en, de } |