feat: revamp email templates to be more style agnostic (#7375)

* feat: re-designed digest

Updated design, logic no longer shows "no topics", just doesn't
show the list at all, teaser re-retrieved for digest so that it
always grabs a teaser even if there is no reply, changed default
email background to a light grey.

* fix: minor padding issues in digest

* fix: banned template

* fix: invitation.tpl

* fix: removed unused notif_chat and notif_post email templates

* fix: notification template

* fix: registration_accepted template

* fix: reset tpl

* fix: test tpl

* fix: email verify tpl

* fix: reset notify tpl

* fix: welcome tpl

* fix: additional minor font fixes

* fix: removed unused email header image assets

* fix: internationalised 'your daily digest' string

* fix: broken url in digest 🤦

* feat: added RTL support for emailer

/cc @PostMidnight
This commit is contained in:
Julian Lam
2019-02-20 16:13:26 -05:00
committed by GitHub
parent e013597e33
commit f32a992237
30 changed files with 272 additions and 376 deletions

View File

@@ -195,12 +195,13 @@ Emailer.send = function (template, uid, params, callback) {
settings: async.apply(User.getSettings, uid),
}, next);
},
function (results, next) {
async function (results, next) {
if (!results.email) {
winston.warn('uid : ' + uid + ' has no email, not sending.');
return next();
}
params.uid = uid;
params.rtl = await translator.translate('[[language:dir]]', results.settings.userLang) === 'rtl';
Emailer.sendToEmail(template, results.email, results.settings.userLang, params, next);
},
], callback);
@@ -282,6 +283,7 @@ Emailer.sendToEmail = function (template, email, language, params, callback) {
pid: params.pid,
fromUid: params.fromUid,
headers: params.headers,
rtl: params.rtl,
};
Plugins.fireHook('filter:email.modify', data, next);
},