[web] update copy in email notifications (#32912)

* add footerMessage to base email template
* add customized subject line and CTA
* add _getBundledActivityList

GitOrigin-RevId: e70c0955485b0892f31e20daa0430faef80b0d64
This commit is contained in:
Kristina
2026-04-23 08:07:01 +00:00
committed by Copybot
parent a64d1bbb6a
commit b6ec7945f4
3 changed files with 56 additions and 0 deletions
@@ -38,6 +38,12 @@ function _emailBodyPlainText(content, opts, ctaEmail) {
emailBody += settings.email.template.customFooter
}
const footerMessage = content.footerMessage(opts, true)
if (footerMessage) {
emailBody += `\r\n\r\n`
emailBody += footerMessage
}
return emailBody
}
@@ -62,11 +68,17 @@ function ctaTemplate(content) {
if (!content.gmailGoToAction) {
content.gmailGoToAction = () => {}
}
if (!content.footerMessage) {
content.footerMessage = () => {}
}
return {
subject(opts) {
return content.subject(opts)
},
layout: BaseWithHeaderEmailLayout,
footerMessage(opts) {
return content.footerMessage(opts)
},
plainTextTemplate(opts) {
return _emailBodyPlainText(content, opts, true)
},
@@ -127,6 +139,9 @@ function buildEmail(templateName, opts) {
const template = templates[templateName]
opts.siteUrl = settings.siteUrl
opts.body = template.compiledTemplate(opts)
opts.footerMessage = template.footerMessage
? template.footerMessage(opts)
: ''
return {
subject: template.subject(opts),
html: template.layout(opts),
@@ -380,6 +380,7 @@ export default _.template(`\
settings.siteUrl
}</a>
</small></p>
<% if (footerMessage) { %><p class="force-overleaf-style" style="font-size: 12px; text-align: center;"><%= footerMessage %></p><% } %>
</td></tr></table>
</td></tr></tbody></table>