diff --git a/.github/assets/account.png b/.github/assets/account.png new file mode 100644 index 0000000..e0d76eb Binary files /dev/null and b/.github/assets/account.png differ diff --git a/.github/assets/home.png b/.github/assets/home.png new file mode 100644 index 0000000..898606a Binary files /dev/null and b/.github/assets/home.png differ diff --git a/.github/assets/inbox.png b/.github/assets/inbox.png index 22ea607..8e5ae36 100644 Binary files a/.github/assets/inbox.png and b/.github/assets/inbox.png differ diff --git a/.github/assets/keys.png b/.github/assets/keys.png index 5775bb4..eca3332 100644 Binary files a/.github/assets/keys.png and b/.github/assets/keys.png differ diff --git a/.github/assets/raw.png b/.github/assets/raw.png deleted file mode 100644 index d7577f9..0000000 Binary files a/.github/assets/raw.png and /dev/null differ diff --git a/README.md b/README.md index 149d23b..793d331 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ All data is being removed 48hrs after they have reached the mail server. - Delete your emails ahead of time by pressing the delete button - View the raw email, showing all the headers etc. - Download Attachments with one click -- Password-protected inboxes +- Optional User Account System with email forwarding and inbox locking - and more...
@@ -42,13 +42,14 @@ All data is being removed 48hrs after they have reached the mail server. ## Screenshots -| Inbox | Email using HTML and CSS | +| Homepage | Account Panel | |:---:|:---:| -| | | +| | | + +| Inbox | Email using HTML and CSS | Attachments and Cryptographic Keys view | +|:---:|:---:|:---:| +| | | | -| Email without CSS | Dropdown for cryptographic Keys and Signatures | -|:---:|:---:| -| | |
@@ -65,7 +66,7 @@ All data is being removed 48hrs after they have reached the mail server. ## How can I set this up myself? **Prerequisites:** -- Mail server with IMAP (Optionally also SMTP for email forwarding feature) +- Mail server with IMAP (Optionally also SMTP for registration and protected features) - One or multiple domains dedicated to this - git & nodejs diff --git a/infrastructure/web/routes/auth.js b/infrastructure/web/routes/auth.js index 188bf24..a232bff 100644 --- a/infrastructure/web/routes/auth.js +++ b/infrastructure/web/routes/auth.js @@ -84,7 +84,7 @@ router.get('/auth', redirectIfAuthenticated, (req, res) => { delete req.session.errorMessage delete req.session.successMessage - res.render('login-auth', { + res.render('auth', { title: `Login or Register | ${config.http.branding[0]}`, branding: config.http.branding, errorMessage, diff --git a/infrastructure/web/routes/inbox.js b/infrastructure/web/routes/inbox.js index 16714ef..bc93ebe 100644 --- a/infrastructure/web/routes/inbox.js +++ b/infrastructure/web/routes/inbox.js @@ -658,8 +658,9 @@ router.get('/verify', async(req, res, next) => { debug(`Email ${destinationEmail} verified successfully, cookie set for 24 hours`) - // Redirect to success page - return res.redirect(`/inbox/verify-success?email=${encodeURIComponent(destinationEmail)}`) + // Show success on account page + req.session.accountSuccess = `Successfully verified ${destinationEmail}!` + return res.redirect('/account') } catch (error) { debug(`Error during verification: ${error.message}`) console.error('Error during email verification', error) @@ -667,29 +668,4 @@ router.get('/verify', async(req, res, next) => { res.redirect('/') } }) - -// GET route for verification success page -router.get('/verify-success', async(req, res) => { - const { email } = req.query - - if (!email) { - return res.redirect('/') - } - - const config = req.app.get('config') - const mailProcessingService = req.app.get('mailProcessingService') - const count = await mailProcessingService.getCount() - const largestUid = await req.app.locals.imapService.getLargestUid() - const totalcount = helper.countElementBuilder(count, largestUid) - - res.render('verify-success', { - title: `Email Verified | ${config.http.branding[0]}`, - email: email, - branding: config.http.branding, - purgeTime: purgeTime, - totalcount: totalcount - }) -}) - - module.exports = router diff --git a/infrastructure/web/views/login-auth.twig b/infrastructure/web/views/auth.twig similarity index 100% rename from infrastructure/web/views/login-auth.twig rename to infrastructure/web/views/auth.twig diff --git a/infrastructure/web/views/inbox.twig b/infrastructure/web/views/inbox.twig index e4ac734..9de9102 100644 --- a/infrastructure/web/views/inbox.twig +++ b/infrastructure/web/views/inbox.twig @@ -59,7 +59,7 @@ {% endif %} {% if verificationSent %}
- 📧 Verification email sent to {{ verificationEmail }}. Please check your inbox and click the verification link (expires in 15 minutes). + Verification email sent to {{ verificationEmail }}. Please check your inbox and click the verification link (expires in 15 minutes).
{% endif %} {% if errorMessage %} diff --git a/infrastructure/web/views/mail.twig b/infrastructure/web/views/mail.twig index 122c03c..077e806 100644 --- a/infrastructure/web/views/mail.twig +++ b/infrastructure/web/views/mail.twig @@ -54,7 +54,7 @@ {% endif %} {% if verificationSent %}
- 📧 Verification email sent to {{ verificationEmail }}. Please check your inbox and click the verification link (expires in 15 minutes). + Verification email sent to {{ verificationEmail }}. Please check your inbox and click the verification link (expires in 15 minutes).
{% endif %}
diff --git a/infrastructure/web/views/register.twig b/infrastructure/web/views/register.twig deleted file mode 100644 index 4891e41..0000000 --- a/infrastructure/web/views/register.twig +++ /dev/null @@ -1,96 +0,0 @@ -{% extends 'layout.twig' %} - -{% block header %} - -{% endblock %} - -{% block body %} -
-
-

Create Account

-

Sign up to unlock email forwarding and inbox locking

- - {% if errorMessage %} -
- {{ errorMessage }} -
- {% endif %} - - {% if successMessage %} -
- {{ successMessage }} -
- {% endif %} - -
-
- - - Only letters, numbers, and underscores allowed - - - - Must contain uppercase, lowercase, and number - - - - -
- -
-
-
- - -
- -
-

Why Register?

-
    -
  • ✓ Forward emails to your real address
  • -
  • ✓ Lock up to 5 inboxes with passwords
  • -
  • ✓ Manage multiple verified forwarding emails
  • -
  • ✓ Access your locked inboxes from anywhere
  • -
-
-
-{% endblock %} diff --git a/infrastructure/web/views/verify-success.twig b/infrastructure/web/views/verify-success.twig deleted file mode 100644 index b684577..0000000 --- a/infrastructure/web/views/verify-success.twig +++ /dev/null @@ -1,62 +0,0 @@ -{% extends 'layout.twig' %} - -{% block header %} - -{% endblock %} - -{% block body %} -
-
-
- - - - -
- -

Email Verified Successfully!

- -
-

You have verified ownership of:

-

{{ email }}

-
- -
-

✓ You can now forward emails to this address for the next 24 hours

-

✓ After 24 hours, you'll need to verify again

-

✓ You can close this tab and return to your inbox

-
- - -
-
-{% endblock %} diff --git a/package.json b/package.json index 4ee1e34..134bbc1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "48hr.email", - "version": "1.8.2", + "version": "1.9.0", "private": false, "description": "48hr.email is your favorite open-source tempmail client.", "keywords": [