From bcd9c06899d71e5bbe001581bbe675d583d6ac0f Mon Sep 17 00:00:00 2001 From: ClaraCrazy Date: Wed, 1 Nov 2023 12:33:58 +0100 Subject: [PATCH] Add configurable branding --- infrastructure/web/routes/inbox.js | 2 +- infrastructure/web/routes/login.js | 8 +++++--- infrastructure/web/views/layout.twig | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/infrastructure/web/routes/inbox.js b/infrastructure/web/routes/inbox.js index ebbab7e..14cc212 100644 --- a/infrastructure/web/routes/inbox.js +++ b/infrastructure/web/routes/inbox.js @@ -14,7 +14,7 @@ const sanitizeAddress = sanitizeParam('address').customSanitizer( router.get('^/:address([^@/]+@[^@/]+)', sanitizeAddress, (req, res, _next) => { const mailProcessingService = req.app.get('mailProcessingService') res.render('inbox', { - title: "48hr.email | " + req.params.address, + title: `${config.branding[0]} | ` + req.params.address, address: req.params.address, mailSummaries: mailProcessingService.getMailSummaries(req.params.address) }) diff --git a/infrastructure/web/routes/login.js b/infrastructure/web/routes/login.js index 03464b8..227ab0b 100644 --- a/infrastructure/web/routes/login.js +++ b/infrastructure/web/routes/login.js @@ -7,9 +7,10 @@ const config = require('../../../application/config') router.get('/', (req, res, _next) => { res.render('login', { - title: '48hr.email | Your temporary Inbox', + title: `${config.branding[0]} | Your temporary Inbox`, username: randomWord(), - domains: config.email.domains + domains: config.email.domains, + madeby: config.branding[1] }) }) @@ -30,7 +31,8 @@ router.post( title: 'Login', username: req.body.username, domain: req.body.domain, - userInputError: true + userInputError: true, + madeby: config.branding[1] }) } diff --git a/infrastructure/web/views/layout.twig b/infrastructure/web/views/layout.twig index 7032fdb..d98cce8 100644 --- a/infrastructure/web/views/layout.twig +++ b/infrastructure/web/views/layout.twig @@ -19,7 +19,7 @@
- + {% block body %}{% endblock %} @@ -28,7 +28,7 @@ {% block footer %} {% endblock %}