diff --git a/app/email/email.go b/app/email/email.go index e38e522eb5..d1d9384911 100644 --- a/app/email/email.go +++ b/app/email/email.go @@ -515,11 +515,6 @@ func (es *Service) SendGuestInviteEmails(team *model.Team, channels []*model.Cha data.Props["Title"] = i18n.T("api.templates.invite_body.title", map[string]interface{}{"SenderName": senderName, "TeamDisplayName": team.DisplayName}) data.Props["SubTitle"] = i18n.T("api.templates.invite_body_guest.subTitle") data.Props["Button"] = i18n.T("api.templates.invite_body.button") - data.Props["SenderName"] = senderName - data.Props["Message"] = "" - if message != "" { - data.Props["Message"] = message - } data.Props["InviteFooterTitle"] = i18n.T("api.templates.invite_body_footer.title") data.Props["InviteFooterInfo"] = i18n.T("api.templates.invite_body_footer.info") data.Props["InviteFooterLearnMore"] = i18n.T("api.templates.invite_body_footer.learn_more") @@ -555,16 +550,25 @@ func (es *Service) SendGuestInviteEmails(team *model.Team, channels []*model.Cha mlog.Info("sending invitation ", mlog.String("to", invite), mlog.String("link", data.Props["ButtonURL"].(string))) } + senderPhoto := "" embeddedFiles := make(map[string]io.Reader) if message != "" { if senderProfileImage != nil { - data.Props["SenderPhoto"] = "user-avatar.png" + senderPhoto = "user-avatar.png" embeddedFiles = map[string]io.Reader{ - "user-avatar.png": bytes.NewReader(senderProfileImage), + senderPhoto: bytes.NewReader(senderProfileImage), } } } + pData := postData{ + SenderName: senderName, + Message: template.HTML(message), + SenderPhoto: senderPhoto, + } + + data.Props["Posts"] = []postData{pData} + body, err := es.templatesContainer.RenderToString("invite_body", data) if err != nil { mlog.Error("Failed to send invite email successfully", mlog.Err(err)) diff --git a/templates/cloud_trial_end_warning.html b/templates/cloud_trial_end_warning.html index c59c07bbae..09b97cac78 100644 --- a/templates/cloud_trial_end_warning.html +++ b/templates/cloud_trial_end_warning.html @@ -99,14 +99,18 @@ font-weight: 600 !important; font-size: 28px !important; line-height: 36px !important; - letter-spacing: -0.02em !important; - color: #3D3C40 !important; + letter-spacing: -0.01em !important; + color: #3F4350 !important; } .subTitle div { font-size: 16px !important; line-height: 24px !important; - color: rgba(61, 60, 64, 0.64) !important; + color: rgba(63, 67, 80, 0.64) !important; + } + + .subTitle a { + color: rgb(28, 88, 217) !important; } .button a { @@ -118,10 +122,21 @@ padding: 15px 24px !important; } + .messageButton a { + background-color: #FFFFFF !important; + border: 1px solid #FFFFFF !important; + box-sizing: border-box !important; + color: #1C58D9 !important; + padding: 12px 20px !important; + font-weight: 600 !important; + font-size: 14px !important; + line-height: 14px !important; + } + .info div { font-size: 14px !important; line-height: 20px !important; - color: #3D3C40 !important; + color: #3F4350 !important; padding: 40px 0px !important; } @@ -129,14 +144,14 @@ font-weight: 600 !important; font-size: 16px !important; line-height: 24px !important; - color: #3D3C40 !important; + color: #3F4350 !important; padding: 0px 0px 4px 0px !important; } .footerInfo div { font-size: 14px !important; line-height: 20px !important; - color: #3D3C40 !important; + color: #3F4350 !important; padding: 0px 48px 0px 48px !important; } @@ -158,7 +173,7 @@ .emailFooter div { font-size: 12px !important; line-height: 16px !important; - color: rgba(61, 60, 64, 0.56) !important; + color: rgba(63, 67, 80, 0.56) !important; padding: 8px 24px 8px 24px !important; } @@ -186,20 +201,67 @@ width: 32px !important; } - .senderName div { + .postNameAndTime { + padding: 0px 0px 4px 0px !important; + display: flex; + } + + .senderName { + font-family: Open Sans, sans-serif; text-align: left !important; font-weight: 600 !important; font-size: 14px !important; line-height: 20px !important; - color: #3D3C40 !important; - padding: 0px 0px 4px 0px !important; + color: #3F4350 !important; + } + + .time { + font-family: Open Sans, sans-serif; + font-size: 12px; + line-height: 16px; + color: rgba(63, 67, 80, 0.56); + padding: 2px 6px; + align-items: center; + float: left; + } + + .channelBg { + background: rgba(63, 67, 80, 0.08); + border-radius: 4px; + display: flex; + padding-left: 4px; + } + + .channelLogo { + width: 10px; + height: 10px; + padding: 5px 4px 5px 6px; + float: left; + } + + .channelName { + font-family: Open Sans, sans-serif; + font-weight: 600; + font-size: 10px; + line-height: 16px; + letter-spacing: 0.01em; + text-transform: uppercase; + color: rgba(63, 67, 80, 0.64); + padding: 2px 6px 2px 0px; + } + + .gmChannelCount { + background-color: rgba(63, 67, 80, 0.2); + padding: 0 5px; + border-radius: 2px; + margin-right: 2px; } .senderMessage div { text-align: left !important; font-size: 14px !important; line-height: 20px !important; - color: #3D3C40 !important; + color: #3F4350 !important; padding: 0px !important; } @@ -386,9 +448,7 @@
{{.Props.QuestionInfo}} - - feedback-cloud@mattermost.com - + feedback-cloud@mattermost.com
diff --git a/templates/cloud_trial_ended_email.html b/templates/cloud_trial_ended_email.html index d7c5b1317a..f6aebf35ad 100644 --- a/templates/cloud_trial_ended_email.html +++ b/templates/cloud_trial_ended_email.html @@ -99,14 +99,18 @@ font-weight: 600 !important; font-size: 28px !important; line-height: 36px !important; - letter-spacing: -0.02em !important; - color: #3D3C40 !important; + letter-spacing: -0.01em !important; + color: #3F4350 !important; } .subTitle div { font-size: 16px !important; line-height: 24px !important; - color: rgba(61, 60, 64, 0.64) !important; + color: rgba(63, 67, 80, 0.64) !important; + } + + .subTitle a { + color: rgb(28, 88, 217) !important; } .button a { @@ -118,10 +122,21 @@ padding: 15px 24px !important; } + .messageButton a { + background-color: #FFFFFF !important; + border: 1px solid #FFFFFF !important; + box-sizing: border-box !important; + color: #1C58D9 !important; + padding: 12px 20px !important; + font-weight: 600 !important; + font-size: 14px !important; + line-height: 14px !important; + } + .info div { font-size: 14px !important; line-height: 20px !important; - color: #3D3C40 !important; + color: #3F4350 !important; padding: 40px 0px !important; } @@ -129,14 +144,14 @@ font-weight: 600 !important; font-size: 16px !important; line-height: 24px !important; - color: #3D3C40 !important; + color: #3F4350 !important; padding: 0px 0px 4px 0px !important; } .footerInfo div { font-size: 14px !important; line-height: 20px !important; - color: #3D3C40 !important; + color: #3F4350 !important; padding: 0px 48px 0px 48px !important; } @@ -158,7 +173,7 @@ .emailFooter div { font-size: 12px !important; line-height: 16px !important; - color: rgba(61, 60, 64, 0.56) !important; + color: rgba(63, 67, 80, 0.56) !important; padding: 8px 24px 8px 24px !important; } @@ -186,20 +201,67 @@ width: 32px !important; } - .senderName div { + .postNameAndTime { + padding: 0px 0px 4px 0px !important; + display: flex; + } + + .senderName { + font-family: Open Sans, sans-serif; text-align: left !important; font-weight: 600 !important; font-size: 14px !important; line-height: 20px !important; - color: #3D3C40 !important; - padding: 0px 0px 4px 0px !important; + color: #3F4350 !important; + } + + .time { + font-family: Open Sans, sans-serif; + font-size: 12px; + line-height: 16px; + color: rgba(63, 67, 80, 0.56); + padding: 2px 6px; + align-items: center; + float: left; + } + + .channelBg { + background: rgba(63, 67, 80, 0.08); + border-radius: 4px; + display: flex; + padding-left: 4px; + } + + .channelLogo { + width: 10px; + height: 10px; + padding: 5px 4px 5px 6px; + float: left; + } + + .channelName { + font-family: Open Sans, sans-serif; + font-weight: 600; + font-size: 10px; + line-height: 16px; + letter-spacing: 0.01em; + text-transform: uppercase; + color: rgba(63, 67, 80, 0.64); + padding: 2px 6px 2px 0px; + } + + .gmChannelCount { + background-color: rgba(63, 67, 80, 0.2); + padding: 0 5px; + border-radius: 2px; + margin-right: 2px; } .senderMessage div { text-align: left !important; font-size: 14px !important; line-height: 20px !important; - color: #3D3C40 !important; + color: #3F4350 !important; padding: 0px !important; } diff --git a/templates/invite_body.html b/templates/invite_body.html index 65c389af08..03f39c96e2 100644 --- a/templates/invite_body.html +++ b/templates/invite_body.html @@ -71,9 +71,9 @@ max-width: 100%; } - .mj-column-per-50 { - width: 50% !important; - max-width: 50%; + .mj-column-per-33-333333333333336 { + width: 33.333333333333336% !important; + max-width: 33.333333333333336%; } .mj-column-per-90 { @@ -88,9 +88,9 @@ max-width: 100%; } - .moz-text-html .mj-column-per-50 { - width: 50% !important; - max-width: 50%; + .moz-text-html .mj-column-per-33-333333333333336 { + width: 33.333333333333336% !important; + max-width: 33.333333333333336%; } .moz-text-html .mj-column-per-90 { @@ -255,6 +255,7 @@ background: rgba(63, 67, 80, 0.08); border-radius: 4px; display: flex; + padding-left: 4px; } .channelLogo { @@ -275,6 +276,13 @@ padding: 2px 6px 2px 0px; } + .gmChannelCount { + background-color: rgba(63, 67, 80, 0.2); + padding: 0 5px; + border-radius: 2px; + margin-right: 2px; + } + .senderMessage div { text-align: left !important; font-size: 14px !important; @@ -417,7 +425,7 @@ - {{if .Props.Message}} + {{if .Props.Message}}{{range .Props.Posts}}
@@ -427,8 +435,8 @@
- -
+ +
@@ -436,8 +444,8 @@
- @@ -454,14 +462,21 @@ - {{if .Props.MessageURL}} + +
- + +
-
{{.Props.SenderName}}
- {{if .Props.Time}} -
{{.Props.Time}}
+
{{.SenderName}}
+ {{if .Time}} +
{{.Time}}
{{end}} - {{if .Props.ChannelName}} + {{if .ChannelName}}
+ {{if .ShowChannelIcon}} -
{{.Props.ChannelName}}
+ {{end}} +
+ {{if .OtherChannelMembersCount}} + {{.OtherChannelMembersCount}} + {{end}} + {{.ChannelName}} +
{{end}}
@@ -469,16 +484,23 @@
-
{{.Props.Message}}
+
{{.Message}}
+
+ +
+ + + {{if .MessageURL}}
@@ -499,7 +521,7 @@
- + {{$.Props.MessageButton}}
- + {{end}} {{else}}
diff --git a/templates/invite_body.mjml b/templates/invite_body.mjml index 2ba9eca036..869a359b2c 100644 --- a/templates/invite_body.mjml +++ b/templates/invite_body.mjml @@ -7,9 +7,9 @@ {{if .Props.Message}} -
- -
+ {{range .Props.Posts}}
+ +
{{end}}
{{else}} diff --git a/templates/license_up_for_renewal.html b/templates/license_up_for_renewal.html index aeb515e0f9..66a7fac3c5 100644 --- a/templates/license_up_for_renewal.html +++ b/templates/license_up_for_renewal.html @@ -100,13 +100,17 @@ font-size: 28px !important; line-height: 36px !important; letter-spacing: -0.01em !important; - color: #3D3C40 !important; + color: #3F4350 !important; } .subTitle div { font-size: 16px !important; line-height: 24px !important; - color: rgba(61, 60, 64, 0.64) !important; + color: rgba(63, 67, 80, 0.64) !important; + } + + .subTitle a { + color: rgb(28, 88, 217) !important; } .button a { @@ -132,7 +136,7 @@ .info div { font-size: 14px !important; line-height: 20px !important; - color: #3D3C40 !important; + color: #3F4350 !important; padding: 40px 0px !important; } @@ -140,14 +144,14 @@ font-weight: 600 !important; font-size: 16px !important; line-height: 24px !important; - color: #3D3C40 !important; + color: #3F4350 !important; padding: 0px 0px 4px 0px !important; } .footerInfo div { font-size: 14px !important; line-height: 20px !important; - color: #3D3C40 !important; + color: #3F4350 !important; padding: 0px 48px 0px 48px !important; } @@ -169,7 +173,7 @@ .emailFooter div { font-size: 12px !important; line-height: 16px !important; - color: rgba(61, 60, 64, 0.56) !important; + color: rgba(63, 67, 80, 0.56) !important; padding: 8px 24px 8px 24px !important; } @@ -208,23 +212,24 @@ font-weight: 600 !important; font-size: 14px !important; line-height: 20px !important; - color: #3D3C40 !important; + color: #3F4350 !important; } .time { font-family: Open Sans, sans-serif; font-size: 12px; line-height: 16px; - color: rgba(61, 60, 64, 0.56); + color: rgba(63, 67, 80, 0.56); padding: 2px 6px; align-items: center; float: left; } .channelBg { - background: rgba(61, 60, 64, 0.08); + background: rgba(63, 67, 80, 0.08); border-radius: 4px; display: flex; + padding-left: 4px; } .channelLogo { @@ -241,15 +246,22 @@ line-height: 16px; letter-spacing: 0.01em; text-transform: uppercase; - color: rgba(61, 60, 64, 0.64); + color: rgba(63, 67, 80, 0.64); padding: 2px 6px 2px 0px; } + .gmChannelCount { + background-color: rgba(63, 67, 80, 0.2); + padding: 0 5px; + border-radius: 2px; + margin-right: 2px; + } + .senderMessage div { text-align: left !important; font-size: 14px !important; line-height: 20px !important; - color: #3D3C40 !important; + color: #3F4350 !important; padding: 0px !important; } diff --git a/templates/reset_body.html b/templates/reset_body.html index 8d82283cde..e09babea94 100644 --- a/templates/reset_body.html +++ b/templates/reset_body.html @@ -116,7 +116,7 @@ } .subTitle a { - color: rgb(28, 88, 217) !important; + color: rgb(28, 88, 217) !important; } .button a { @@ -218,23 +218,24 @@ font-weight: 600 !important; font-size: 14px !important; line-height: 20px !important; - color: #3D3C40 !important; + color: #3F4350 !important; } .time { font-family: Open Sans, sans-serif; font-size: 12px; line-height: 16px; - color: rgba(61, 60, 64, 0.56); + color: rgba(63, 67, 80, 0.56); padding: 2px 6px; align-items: center; float: left; } .channelBg { - background: rgba(61, 60, 64, 0.08); + background: rgba(63, 67, 80, 0.08); border-radius: 4px; display: flex; + padding-left: 4px; } .channelLogo { @@ -251,15 +252,22 @@ line-height: 16px; letter-spacing: 0.01em; text-transform: uppercase; - color: rgba(61, 60, 64, 0.64); + color: rgba(63, 67, 80, 0.64); padding: 2px 6px 2px 0px; } + .gmChannelCount { + background-color: rgba(63, 67, 80, 0.2); + padding: 0 5px; + border-radius: 2px; + margin-right: 2px; + } + .senderMessage div { text-align: left !important; font-size: 14px !important; line-height: 20px !important; - color: #3D3C40 !important; + color: #3F4350 !important; padding: 0px !important; } diff --git a/templates/verify_body.html b/templates/verify_body.html index c39f244b00..dee2345d95 100644 --- a/templates/verify_body.html +++ b/templates/verify_body.html @@ -106,7 +106,7 @@ font-size: 28px !important; line-height: 36px !important; letter-spacing: -0.01em !important; - color: #3D3C40 !important; + color: #3F4350 !important; } .subTitle div { @@ -116,7 +116,7 @@ } .subTitle a { - color: rgba(28, 88, 217, 1) !important; + color: rgb(28, 88, 217) !important; } .button a { @@ -179,7 +179,7 @@ .emailFooter div { font-size: 12px !important; line-height: 16px !important; - color: rgba(61, 60, 64, 0.56) !important; + color: rgba(63, 67, 80, 0.56) !important; padding: 8px 24px 8px 24px !important; } @@ -218,23 +218,24 @@ font-weight: 600 !important; font-size: 14px !important; line-height: 20px !important; - color: #3D3C40 !important; + color: #3F4350 !important; } .time { font-family: Open Sans, sans-serif; font-size: 12px; line-height: 16px; - color: rgba(61, 60, 64, 0.56); + color: rgba(63, 67, 80, 0.56); padding: 2px 6px; align-items: center; float: left; } .channelBg { - background: rgba(61, 60, 64, 0.08); + background: rgba(63, 67, 80, 0.08); border-radius: 4px; display: flex; + padding-left: 4px; } .channelLogo { @@ -251,15 +252,22 @@ line-height: 16px; letter-spacing: 0.01em; text-transform: uppercase; - color: rgba(61, 60, 64, 0.64); + color: rgba(63, 67, 80, 0.64); padding: 2px 6px 2px 0px; } + .gmChannelCount { + background-color: rgba(63, 67, 80, 0.2); + padding: 0 5px; + border-radius: 2px; + margin-right: 2px; + } + .senderMessage div { text-align: left !important; font-size: 14px !important; line-height: 20px !important; - color: #3D3C40 !important; + color: #3F4350 !important; padding: 0px !important; } diff --git a/templates/welcome_body.html b/templates/welcome_body.html index b0026e68bb..d81f5ca828 100644 --- a/templates/welcome_body.html +++ b/templates/welcome_body.html @@ -106,7 +106,7 @@ font-size: 28px !important; line-height: 36px !important; letter-spacing: -0.01em !important; - color: #3D3C40 !important; + color: #3F4350 !important; } .subTitle div { @@ -116,7 +116,7 @@ } .subTitle a { - color: rgba(28, 88, 217, 1) !important; + color: rgb(28, 88, 217) !important; } .button a { @@ -179,7 +179,7 @@ .emailFooter div { font-size: 12px !important; line-height: 16px !important; - color: rgba(61, 60, 64, 0.56) !important; + color: rgba(63, 67, 80, 0.56) !important; padding: 8px 24px 8px 24px !important; } @@ -218,23 +218,24 @@ font-weight: 600 !important; font-size: 14px !important; line-height: 20px !important; - color: #3D3C40 !important; + color: #3F4350 !important; } .time { font-family: Open Sans, sans-serif; font-size: 12px; line-height: 16px; - color: rgba(61, 60, 64, 0.56); + color: rgba(63, 67, 80, 0.56); padding: 2px 6px; align-items: center; float: left; } .channelBg { - background: rgba(61, 60, 64, 0.08); + background: rgba(63, 67, 80, 0.08); border-radius: 4px; display: flex; + padding-left: 4px; } .channelLogo { @@ -251,15 +252,22 @@ line-height: 16px; letter-spacing: 0.01em; text-transform: uppercase; - color: rgba(61, 60, 64, 0.64); + color: rgba(63, 67, 80, 0.64); padding: 2px 6px 2px 0px; } + .gmChannelCount { + background-color: rgba(63, 67, 80, 0.2); + padding: 0 5px; + border-radius: 2px; + margin-right: 2px; + } + .senderMessage div { text-align: left !important; font-size: 14px !important; line-height: 20px !important; - color: #3D3C40 !important; + color: #3F4350 !important; padding: 0px !important; }