@adminforth/open-signup 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build.log CHANGED
@@ -8,5 +8,5 @@ custom/SignupPage.vue
8
8
  custom/SignupUnderLogin.vue
9
9
  custom/tsconfig.json
10
10
 
11
- sent 14,444 bytes received 77 bytes 29,042.00 bytes/sec
12
- total size is 14,155 speedup is 0.97
11
+ sent 14,440 bytes received 77 bytes 29,034.00 bytes/sec
12
+ total size is 14,155 speedup is 0.98
package/dist/index.js CHANGED
@@ -267,21 +267,31 @@ export default class OpenSignupPlugin extends AdminForthPlugin {
267
267
  The {brandName} Team
268
268
 
269
269
  `, 'opensignup', { brandName, url, verifyToken });
270
- const emailHtml = yield tr(`
271
- <html>
272
- <head></head>
273
- <body>
274
- <p>Dear user,</p>
275
- <p>Welcome to {brandName}!</p>
276
- <p>To confirm your email, click the link below:</p>
277
- <a href="{url}?token={verifyToken}">Confirm email</a>
278
- <p>If you didn't request this, please ignore this email.</p>
279
- <p>Link is valid for 2 hours.</p>
280
- <p>Thanks,</p>
281
- <p>The {brandName} Team</p>
282
- </body>
283
- </html>
284
- `, 'opensignup', { brandName, url, verifyToken });
270
+ const emailData = {
271
+ greeting: yield tr('Dear user,', 'opensignup'),
272
+ welcome: yield tr('Welcome to {brandName}!', 'opensignup', { brandName }),
273
+ instruction: yield tr('To confirm your email, click the link below:', 'opensignup'),
274
+ linkText: yield tr('Confirm email', 'opensignup'),
275
+ disclaimer: yield tr('If you didn\'t request this, please ignore this email.', 'opensignup'),
276
+ validity: yield tr('Link is valid for 2 hours.', 'opensignup'),
277
+ thanks: yield tr('Thanks,', 'opensignup'),
278
+ team: yield tr('The {brandName} Team', 'opensignup', { brandName }),
279
+ };
280
+ const emailHtml = `
281
+ <html>
282
+ <head></head>
283
+ <body>
284
+ <p>${emailData.greeting}</p>
285
+ <p>${emailData.welcome}</p>
286
+ <p>${emailData.instruction}</p>
287
+ <a href="${url}?token=${verifyToken}">${emailData.linkText}</a>
288
+ <p>${emailData.disclaimer}</p>
289
+ <p>${emailData.validity}</p>
290
+ <p>${emailData.thanks}</p>
291
+ <p>${emailData.team}</p>
292
+ </body>
293
+ </html>
294
+ `;
285
295
  const emailSubject = yield tr(`Signup request at {brandName}`, 'opensignup', { brandName });
286
296
  // send email with AWS SES this.options.providerOptions.AWS_SES
287
297
  this.options.confirmEmails.adapter.sendEmail(this.options.confirmEmails.sendFrom, email, emailText, emailHtml, emailSubject);
package/index.ts CHANGED
@@ -310,23 +310,33 @@ export default class OpenSignupPlugin extends AdminForthPlugin {
310
310
 
311
311
  `, 'opensignup', { brandName, url, verifyToken }
312
312
  );
313
-
314
- const emailHtml = await tr(`
315
- <html>
316
- <head></head>
317
- <body>
318
- <p>Dear user,</p>
319
- <p>Welcome to {brandName}!</p>
320
- <p>To confirm your email, click the link below:</p>
321
- <a href="{url}?token={verifyToken}">Confirm email</a>
322
- <p>If you didn't request this, please ignore this email.</p>
323
- <p>Link is valid for 2 hours.</p>
324
- <p>Thanks,</p>
325
- <p>The {brandName} Team</p>
326
- </body>
327
- </html>
328
- `, 'opensignup', { brandName, url, verifyToken });
329
313
 
314
+ const emailData = {
315
+ greeting: await tr('Dear user,', 'opensignup'),
316
+ welcome: await tr('Welcome to {brandName}!', 'opensignup', { brandName }),
317
+ instruction: await tr('To confirm your email, click the link below:', 'opensignup'),
318
+ linkText: await tr('Confirm email', 'opensignup'),
319
+ disclaimer: await tr('If you didn\'t request this, please ignore this email.', 'opensignup'),
320
+ validity: await tr('Link is valid for 2 hours.', 'opensignup'),
321
+ thanks: await tr('Thanks,', 'opensignup'),
322
+ team: await tr('The {brandName} Team', 'opensignup', { brandName }),
323
+ };
324
+
325
+ const emailHtml = `
326
+ <html>
327
+ <head></head>
328
+ <body>
329
+ <p>${emailData.greeting}</p>
330
+ <p>${emailData.welcome}</p>
331
+ <p>${emailData.instruction}</p>
332
+ <a href="${url}?token=${verifyToken}">${emailData.linkText}</a>
333
+ <p>${emailData.disclaimer}</p>
334
+ <p>${emailData.validity}</p>
335
+ <p>${emailData.thanks}</p>
336
+ <p>${emailData.team}</p>
337
+ </body>
338
+ </html>
339
+ `;
330
340
  const emailSubject = await tr(`Signup request at {brandName}`, 'opensignup', { brandName });
331
341
 
332
342
  // send email with AWS SES this.options.providerOptions.AWS_SES
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/open-signup",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",