The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Restyle the user-joined invite email with the modern card template (#75452)
Maz Amelib098b29d4684
diff --git a/src/metabase/channel/email/messages.clj b/src/metabase/channel/email/messages.cljindex a0669d9078f..308e53df736 100644--- a/src/metabase/channel/email/messages.clj+++ b/src/metabase/channel/email/messages.clj@@ -136,14 +136,17 @@:recipients recipients:message-type :html:message (channel.template/render "metabase/channel/email/user_joined_notification.hbs"- (merge (common-context)- {:logoHeader true- :joinedUserName (or (:first_name new-user) (:email new-user))- :joinedViaSSO google-auth?- :joinedUserEmail (:email new-user)- :joinedDate (t/format "EEEE, MMMM d" (t/zoned-date-time)) ; e.g. "Wednesday, July 13".- :adminEmail (first recipients)- :joinedUserEditUrl (str (system/site-url) "/admin/people")}))})))+ {:context {:application_name (appearance/application-name)+ :application_color (channel.render/primary-color)+ :application_logo_url (logo-url)+ :site_url (system/site-url)}+ :payload {:style {:color_text_dark channel.render/color-text-dark}}+ :joinedUserName (or (:first_name new-user) (:email new-user))+ :joinedViaSSO google-auth?+ :joinedUserEmail (:email new-user)+ :joinedDate (t/format "EEEE, MMMM d" (t/zoned-date-time)) ; e.g. "Wednesday, July 13".+ :adminEmail (first recipients)+ :joinedUserEditUrl (str (system/site-url) "/admin/people")})})))(defn send-password-reset-email!"Format and send an email informing the user how to reset their password."diff --git a/src/metabase/channel/email/user_joined_notification.hbs b/src/metabase/channel/email/user_joined_notification.hbsindex e92ee9b1a8f..6e0623c4d35 100644--- a/src/metabase/channel/email/user_joined_notification.hbs+++ b/src/metabase/channel/email/user_joined_notification.hbs@@ -1,29 +1,60 @@-{{> metabase/channel/email/_header.hbs }}- <div style="padding: 2em 4em; border: 1px solid #dddddd; border-radius: 2px; background-color: white; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); text-align: center;">- <div style="padding-bottom: 1em;">- <h2 style="font-weight: normal; color: #4C545B;line-height: 1.65rem;">- {{joinedUserName}}- {{#if joinedViaSSO}}- created a {{applicationName}} account.- {{else}}- accepted their {{applicationName}} invitation.- {{/if}}- </h2>- <h4 style="font-weight: normal;">- <a style="color: #4A90E2; text-decoration: none;" href="mailto:{{{adminEmail}}}">- {{joinedUserEmail}}- </a>- joined {{#if joinedViaSSO}}via Single Sign-On{{/if}} on {{joinedDate}}- </h4>- </div>- <div style="padding: 1em;">- <a style="{{buttonStyle}}" href="{{joinedUserEditUrl}}">- Edit {{joinedUserName}}'s settings- </a>- </div>- <div style="padding-bottom: 2em; font-size: x-small;">- Button not working? Paste this link into your browser:<br/>- {{{joinedUserEditUrl}}}- </div>- </div>-{{> metabase/channel/email/_footer.hbs }}+{{> metabase/channel/email/_dashsub_alert_header.hbs }}+ <body style="padding: 0px; margin: 0px">+ <table class="background" width="100%" border="0" cellspacing="0" cellpadding="0" style="background-color: #F9F9F9; padding: 48px; table-layout: fixed;">+ <tr>+ <td>+ <div class="container" style="background-color: white; max-width: 555px; border-radius: 24px; margin: 0 auto; padding: 40px; border: 1px solid rgba(7, 23, 34, 0.14)">+ <div style="text-align: center; margin-bottom: 32px;">+ <img style="max-height: 45px; max-width: 100%;" src="{{context.application_logo_url}}" alt="{{context.application_name}} logo"/>+ </div>++ <h1 style="text-align: center; font-size: 27px; line-height: 36px; font-weight: 400; margin: 0 0 16px 0; color: #2F3C45;">+ {{#if joinedViaSSO}}+ {{joinedUserName}} created a {{context.application_name}} account.+ {{else}}+ {{joinedUserName}} accepted their {{context.application_name}} invitation.+ {{/if}}+ </h1>++ <p style="text-align: center; font-size: 15px; line-height: 165%; color: #2F3C45; margin: 0;">+ <a href="mailto:{{{adminEmail}}}" style="color: {{context.application_color}}; text-decoration: none;">{{joinedUserEmail}}</a>+ joined {{#if joinedViaSSO}}via Single Sign-On {{/if}}on {{joinedDate}}.+ </p>++ <div style="text-align: center; margin-top: 32px;">+ <a href="{{joinedUserEditUrl}}" style="display: inline-block; background-color: {{context.application_color}}; color: #ffffff !important; font-weight: 700; font-size: 14px; border-radius: 8px; padding: 12px 16px; text-decoration: none;">+ Edit {{joinedUserName}}'s settings+ </a>+ </div>++ <p style="text-align: center; font-size: 12px; line-height: 16px; color: #656F76; margin: 16px 0 0 0;">+ Button not working? Paste this link into your browser:<br/>+ <a href="{{joinedUserEditUrl}}" style="color: {{context.application_color}};">{{{joinedUserEditUrl}}}</a>+ </p>++ <hr style="margin-top: 32px; margin-bottom: 32px;">+ <div style="font-size: 12px; line-height: 16px; width: max-content; margin: 0 auto; color: #656F76; text-align: center;">+ Sent from <a href="{{context.site_url}}" style="color: {{context.application_color}}">{{context.site_url}}</a>.+ </div>+ </div>++ <div style="margin-top: 40px;">+ <div style="text-align: center; color: #92999E; font-size: 13px;">+ Metabase, Inc.+ </div>++ <div style="text-align: center; color: #92999E; font-size: 13px;">+ 9740 Campo Rd., Suite 1029, Spring Valley, CA 91977+ </div>++ <div style="text-align: center; margin-top: 8px;">+ <a href="https://www.metabase.com" style="color: #656F76 !important; font-size: 13px;">+ www.metabase.com+ </a>+ </div>+ </div>+ </td>+ </tr>+ </table>+ </body>+</html>