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 @@