diff options
| author | John Barratt <[email protected]> | 2023-03-01 12:43:12 -0800 |
|---|---|---|
| committer | John Barratt <[email protected]> | 2023-03-01 12:43:12 -0800 |
| commit | ddeecdba41b42ffab3f55bcb582222b1bf2c060b (patch) | |
| tree | e854c54370c755185d9eef885c453a54e7ebf4b6 | |
| parent | e47d50a443f0a396321716a506e1df325dd4a1fb (diff) | |
| download | coinos-server-ddeecdba41b42ffab3f55bcb582222b1bf2c060b.tar.gz coinos-server-ddeecdba41b42ffab3f55bcb582222b1bf2c060b.zip | |
add email templatesnotifications
| -rw-r--r-- | emails/verify-email/html.ejs | 106 | ||||
| -rw-r--r-- | emails/verify-email/subject.ejs | 1 | ||||
| -rw-r--r-- | emails/verify-phone/html.ejs | 0 | ||||
| -rw-r--r-- | emails/verify-phone/subject.ejs | 0 | ||||
| -rw-r--r-- | emails/wallet-funded/html.ejs | 0 | ||||
| -rw-r--r-- | emails/wallet-funded/subject.ejs | 0 | ||||
| -rw-r--r-- | emails/wallet-withdraw/html.ejs | 0 | ||||
| -rw-r--r-- | emails/wallet-withdraw/subject.ejs | 0 | ||||
| -rw-r--r-- | package.json | 2 | ||||
| -rw-r--r-- | pnpm-lock.yaml | 14 | ||||
| -rw-r--r-- | routes/users.js | 2 |
11 files changed, 116 insertions, 9 deletions
diff --git a/emails/verify-email/html.ejs b/emails/verify-email/html.ejs new file mode 100644 index 00000000..f2f29e56 --- /dev/null +++ b/emails/verify-email/html.ejs @@ -0,0 +1,106 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8" /> + <style> + body { + margin: 0; + font-family: sans-serif; + color: #2D2E32; + } + + p{ + line-height: 1.7; + } + + .container{ + width: 600px; + margin: 0 auto; + background: white; + padding-top: 60px; + } + + .logo { + width: 100%; + margin: 0 auto; + text-align: center; + } + + .logo img { + width: 200px; + margin: 0 auto; + } + + .link{ + display: block; + margin-top: 30px; + color: #0f828a; + text-decoration: none; + } + + hr{ + border-color: whitesmoke; + margin-bottom: 30px; + } + + .confirm-container{ + display: flex; + justify-content: flex-end; + } + + .confirm { + display: flex; + align-items: center; + justify-content: center; + width: 120px; + margin: 40px 0; + text-decoration: none; + border-radius: 30px; + padding: 0.8rem 1.5rem !important; + color: #444444; + font-weight: bold; + background: rgb(143,238,245); + background: linear-gradient(90deg, rgba(143,238,245,1) 0%, rgba(127,228,235,1) 50%, rgba(110,216,224,1) 100%); + border: 0px solid white; + } + + .footer p{ + font-size: 13px; + } + + .footer .social { + display: flex; + justify-content: flex-start; + margin-bottom: 20px; + } + + .footer .social a{ + margin-right: 20px; + } + + .footer .visit{ + color: #2D2E32; + font-size: 13px; + } + </style> + </head> + + <body> + <div class="container"> + <div class="logo"> + <img src="" /> + </div> + <p>Hello,</p> + <p>Please click on the confirmation button or on the following link to confirm your email.</p> + <a class="link" href="<%= url %>/activate/<%= ticket %>"><%= url %>/activate/<%= ticket %></a> + <div class="confirm-container"> + <a class="confirm" href="<%= url %>/activate/<%= ticket %>">Confirm email</a> + </div> + <hr/> + <div class="footer"> + <a class="visit" href="<%= url %>">Visit website</a> + <p>© Coinos</p> + </div> + </div> + </body> +</html> diff --git a/emails/verify-email/subject.ejs b/emails/verify-email/subject.ejs new file mode 100644 index 00000000..38b83532 --- /dev/null +++ b/emails/verify-email/subject.ejs @@ -0,0 +1 @@ +[Coinos] Please Confirm Your Email
\ No newline at end of file diff --git a/emails/verify-phone/html.ejs b/emails/verify-phone/html.ejs new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/emails/verify-phone/html.ejs diff --git a/emails/verify-phone/subject.ejs b/emails/verify-phone/subject.ejs new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/emails/verify-phone/subject.ejs diff --git a/emails/wallet-funded/html.ejs b/emails/wallet-funded/html.ejs new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/emails/wallet-funded/html.ejs diff --git a/emails/wallet-funded/subject.ejs b/emails/wallet-funded/subject.ejs new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/emails/wallet-funded/subject.ejs diff --git a/emails/wallet-withdraw/html.ejs b/emails/wallet-withdraw/html.ejs new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/emails/wallet-withdraw/html.ejs diff --git a/emails/wallet-withdraw/subject.ejs b/emails/wallet-withdraw/subject.ejs new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/emails/wallet-withdraw/subject.ejs diff --git a/package.json b/package.json index edd8fc72..a29b6cd8 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@fastify/static": "^6.5.0", "@fastify/websocket": "^7.0.1", "@sendgrid/mail": "^7.7.0", - "bcrypt": "^5.0.0", + "bcrypt": "5.1.0", "bech32": "^2.0.0", "clightning-client": "^0.1.2", "date-fns": "^2.21.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 120a8197..846bdcc0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,7 +7,7 @@ specifiers: '@fastify/static': ^6.5.0 '@fastify/websocket': ^7.0.1 '@sendgrid/mail': ^7.7.0 - bcrypt: ^5.0.0 + bcrypt: 5.1.0 bech32: ^2.0.0 clightning-client: ^0.1.2 date-fns: ^2.21.3 @@ -404,8 +404,8 @@ packages: picomatch: 2.3.1 dev: false - /aproba/2.0.0: - resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} + /aproba/1.2.0: + resolution: {integrity: sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==} dev: false /archy/1.0.0: @@ -1208,7 +1208,7 @@ packages: resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} engines: {node: '>=10'} dependencies: - aproba: 2.0.0 + aproba: 1.2.0 color-support: 1.1.3 console-control-strings: 1.1.0 has-unicode: 2.0.1 @@ -1711,8 +1711,8 @@ packages: yallist: 4.0.0 dev: false - /minipass/4.2.0: - resolution: {integrity: sha512-ExlilAIS7zJ2EWUMaVXi14H+FnZ18kr17kFkGemMqBx6jW0m8P6XfqwYVPEG53ENlgsED+alVP9ZxC3JzkK23Q==} + /minipass/4.2.4: + resolution: {integrity: sha512-lwycX3cBMTvcejsHITUgYj6Gy6A7Nh4Q6h9NP4sTHY1ccJlC7yKzDmiShEHsJ16Jf1nKGDEaiHxiltsJEvk0nQ==} engines: {node: '>=8'} dev: false @@ -2530,7 +2530,7 @@ packages: dependencies: chownr: 2.0.0 fs-minipass: 2.1.0 - minipass: 4.2.0 + minipass: 4.2.4 minizlib: 2.1.2 mkdirp: 1.0.4 yallist: 4.0.0 diff --git a/routes/users.js b/routes/users.js index 5f1affab..b467896c 100644 --- a/routes/users.js +++ b/routes/users.js @@ -11,7 +11,7 @@ import { emit } from "$lib/sockets"; import register from "$lib/register"; import { requirePin } from "$lib/utils"; import { v4 } from "uuid"; -import { parseISO } from "date-fns"; +// import { parseISO } from "date-fns"; import { types } from "$lib/payments"; import got from "got"; |
