Skip to content

Commit ea2b9b7

Browse files
authored
[PM-30610] Address design feedback for the organization confirmation email templates. (#6873)
1 parent bf9cc01 commit ea2b9b7

File tree

9 files changed

+2058
-1777
lines changed

9 files changed

+2058
-1777
lines changed

src/Core/AdminConsole/Models/Mail/Mailer/OrganizationConfirmation/OrganizationConfirmationEnterpriseTeamsView.html.hbs

Lines changed: 737 additions & 758 deletions
Large diffs are not rendered by default.

src/Core/AdminConsole/Models/Mail/Mailer/OrganizationConfirmation/OrganizationConfirmationFamilyFreeView.html.hbs

Lines changed: 903 additions & 921 deletions
Large diffs are not rendered by default.

src/Core/MailTemplates/Mjml/.mjmlconfig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
"components/mj-bw-simple-hero",
55
"components/mj-bw-icon-row",
66
"components/mj-bw-learn-more-footer",
7-
"emails/AdminConsole/components/mj-bw-inviter-info"
7+
"emails/AdminConsole/components/mj-bw-inviter-info",
8+
"emails/AdminConsole/components/mj-bw-ac-hero",
9+
"emails/AdminConsole/components/mj-bw-ac-icon-row",
10+
"emails/AdminConsole/components/mj-bw-ac-learn-more-footer"
811
]
912
}
Lines changed: 45 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,51 @@
11
<mjml>
2-
<mj-head>
3-
<mj-include path="../../../components/head.mjml" />
4-
</mj-head>
2+
<mj-head>
3+
<!-- Include shared head styles -->
4+
<mj-include path="../../../components/head.mjml" />
55

6-
<mj-body css-class="border-fix">
7-
<!-- Blue Header Section -->
8-
<mj-wrapper css-class="border-fix" padding="20px 20px 10px 20px">
9-
<mj-bw-hero
10-
img-src="https://assets.bitwarden.com/email/v1/spot-enterprise.png"
11-
title="You can now share passwords with members of <b>{{OrganizationName}}!</b>"
12-
button-text="<b>Log in</b>"
13-
button-url="{{WebVaultUrl}}"
14-
/>
15-
</mj-wrapper>
166

17-
<!-- Main Content -->
18-
<mj-wrapper padding="5px 20px 10px 20px">
19-
<mj-section background-color="#fff" padding="15px 10px 10px 10px">
20-
<mj-column>
21-
<mj-text font-size="16px" line-height="24px" padding="10px 15px">
22-
As a member of <b>{{OrganizationName}}</b>:
23-
</mj-text>
24-
</mj-column>
25-
</mj-section>
26-
<mj-bw-icon-row
27-
icon-src="https://assets.bitwarden.com/email/v1/icon-enterprise.png"
28-
icon-alt="Organization Icon"
29-
text="Your account is owned by {{OrganizationName}} and is subject to their security and management policies."
30-
/>
31-
<mj-bw-icon-row
32-
icon-src="https://assets.bitwarden.com/email/v1/icon-account-switching-new.png"
33-
icon-alt="Group Users Icon"
34-
text="You can easily access and share passwords with your team."
35-
foot-url-text="Share passwords in Bitwarden"
36-
foot-url="https://bitwarden.com/help/sharing"
37-
/>
38-
<mj-section background-color="#fff" padding="0 20px 20px 20px">
39-
</mj-section>
40-
</mj-wrapper>
7+
</mj-head>
418

42-
<!-- Learn More Section -->
43-
<mj-wrapper padding="5px 20px 10px 20px">
44-
<mj-bw-learn-more-footer />
45-
</mj-wrapper>
9+
<mj-body>
10+
<!-- Blue Header Section -->
11+
<mj-wrapper css-class="border-fix" padding="20px 20px 10px 20px">
12+
<mj-bw-ac-hero
13+
title="You can now share passwords with members of <b>{{OrganizationName}}!</b>"
14+
img-src="https://assets.bitwarden.com/email/v1/ac-spot-enterprise.png"
15+
button-text="<b>Log in</b>"
16+
button-url="{{WebVaultUrl}}"
17+
/>
18+
</mj-wrapper>
4619

47-
<!-- Footer -->
48-
<mj-include path="../../../components/footer.mjml" />
49-
</mj-body>
20+
<!-- Main Content -->
21+
<mj-wrapper padding="5px 20px 8px 20px">
22+
<mj-section background-color="#fff" padding="10px 10px 16px 10px">
23+
<mj-column>
24+
<mj-text font-size="16px" line-height="24px" padding="15px 15px 0px 15px">
25+
As a member of <b>{{OrganizationName}}</b>:
26+
</mj-text>
27+
</mj-column>
28+
</mj-section>
29+
<mj-bw-ac-icon-row
30+
icon-src="https://assets.bitwarden.com/email/v1/icon-enterprise.png"
31+
icon-alt="Organization Icon"
32+
text="Your account is owned by {{OrganizationName}} and is subject to their security and management policies."
33+
/>
34+
<mj-bw-ac-icon-row
35+
icon-src="https://assets.bitwarden.com/email/v1/icon-account-switching-new.png"
36+
icon-alt="Share Icon"
37+
text="You can easily access and share passwords with your team."
38+
foot-url-text="Share passwords in Bitwarden"
39+
foot-url="https://bitwarden.com/help/sharing"
40+
/>
41+
</mj-wrapper>
42+
43+
<!-- Learn More Section -->
44+
<mj-wrapper padding="8px 20px 10px 20px">
45+
<mj-bw-ac-learn-more-footer />
46+
</mj-wrapper>
47+
48+
<!-- Footer -->
49+
<mj-include path="../../../components/footer.mjml" />
50+
</mj-body>
5051
</mjml>
Lines changed: 102 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,104 @@
11
<mjml>
2-
<mj-head>
3-
<mj-include path="../../../components/head.mjml" />
4-
</mj-head>
5-
6-
<mj-body css-class="border-fix">
7-
<!-- Blue Header Section -->
8-
<mj-wrapper css-class="border-fix" padding="20px 20px 10px 20px">
9-
<mj-bw-hero
10-
img-src="https://assets.bitwarden.com/email/v1/spot-family-homes.png"
11-
title="You can now share passwords with members of <b>{{OrganizationName}}!</b>"
12-
button-text="<b>Log in</b>"
13-
button-url="{{WebVaultUrl}}"
14-
/>
15-
</mj-wrapper>
16-
17-
<!-- Main Content -->
18-
<mj-wrapper padding="5px 20px 10px 20px">
19-
<mj-section background-color="#fff" padding="15px 10px 10px 10px">
20-
<mj-column>
21-
<mj-text font-size="16px" line-height="24px" padding="10px 15px">
22-
As a member of <b>{{OrganizationName}}</b>:
23-
</mj-text>
24-
</mj-column>
25-
</mj-section>
26-
<mj-bw-icon-row
27-
icon-src="https://assets.bitwarden.com/email/v1/icon-item-type.png"
28-
icon-alt="Collections Icon"
29-
text="You can access passwords {{OrganizationName}} has shared with you."
30-
/>
31-
<mj-bw-icon-row
32-
icon-src="https://assets.bitwarden.com/email/v1/icon-account-switching-new.png"
33-
icon-alt="Group Users Icon"
34-
text="You can easily share passwords with friends, family, or coworkers."
35-
foot-url-text="Share passwords in Bitwarden"
36-
foot-url="https://bitwarden.com/help/sharing"
37-
/>
38-
<mj-section background-color="#fff" padding="0 20px 20px 20px">
39-
</mj-section>
40-
</mj-wrapper>
41-
42-
<!-- Download Mobile Apps Section -->
43-
<mj-wrapper padding="5px 20px 10px 20px">
44-
<mj-include path="../components/mobile-app-download.mjml" />
45-
</mj-wrapper>
46-
47-
<!-- Learn More Section -->
48-
<mj-wrapper padding="5px 20px 10px 20px">
49-
<mj-bw-learn-more-footer />
50-
</mj-wrapper>
51-
52-
<!-- Footer -->
53-
<mj-include path="../../../components/footer.mjml" />
54-
</mj-body>
2+
<mj-head>
3+
<!-- Include shared head styles -->
4+
<mj-include path="../../../components/head.mjml" />
5+
6+
<!-- Include admin console shared styles --><mj-include path="../components/admin-console-head.mjml" />
7+
</mj-head>
8+
9+
<mj-body>
10+
<!-- Blue Header Section -->
11+
<mj-wrapper css-class="border-fix" padding="20px 20px 10px 20px">
12+
<mj-bw-ac-hero
13+
title="You can now share passwords with members of <b>{{OrganizationName}}!</b>"
14+
img-src="https://assets.bitwarden.com/email/v1/ac-spot-family.png"
15+
button-text="<b>Log in</b>"
16+
button-url="{{WebVaultUrl}}">
17+
</mj-bw-ac-hero>
18+
</mj-wrapper>
19+
20+
<!-- Main Content -->
21+
<mj-wrapper padding="5px 20px 8px 20px">
22+
<mj-section background-color="#fff" padding="10px 10px 16px 10px">
23+
<mj-column>
24+
<mj-text font-size="16px" line-height="24px" padding="15px 15px 0px 15px">
25+
As a member of <b>{{OrganizationName}}</b>:
26+
</mj-text>
27+
</mj-column>
28+
</mj-section>
29+
<mj-bw-ac-icon-row
30+
icon-src="https://assets.bitwarden.com/email/v1/icon-item-type.png"
31+
icon-alt="Group Users Icon"
32+
text="You can access passwords {{OrganizationName}} has shared with you.">
33+
</mj-bw-ac-icon-row>
34+
<mj-bw-ac-icon-row
35+
icon-src="https://assets.bitwarden.com/email/v1/icon-account-switching-new.png"
36+
icon-alt="Share Icon"
37+
text="You can easily share passwords with friends, family, or coworkers."
38+
foot-url-text="Share passwords in Bitwarden"
39+
foot-url="https://bitwarden.com/help/sharing">
40+
</mj-bw-ac-icon-row>
41+
</mj-wrapper>
42+
43+
<!-- Download Mobile Apps Section -->
44+
<mj-wrapper padding="8px 20px 10px 20px">
45+
<mj-section background-color="#fff" padding="32px 10px 0px 25px">
46+
<mj-column>
47+
<mj-text
48+
font-size="18px"
49+
font-weight="500"
50+
line-height="24px"
51+
padding="0 0 16px 0">
52+
Download Bitwarden on all devices
53+
</mj-text>
54+
55+
<mj-text
56+
mj-class="ac-text"
57+
padding="0 0 24px 0">
58+
Already using the <a href="https://bitwarden.com/download/" class="link">browser extension</a>?
59+
Download the Bitwarden mobile app from the
60+
<a href="https://apps.apple.com/us/app/bitwarden-password-manager/id1137397744" class="link">App Store</a>
61+
or <a href="https://play.google.com/store/apps/details?id=com.x8bit.bitwarden" class="link">Google Play</a>
62+
to quickly save logins and autofill forms on the go.
63+
</mj-text>
64+
</mj-column>
65+
</mj-section>
66+
67+
<mj-section background-color="#fff" padding="0 10px 32px 25px">
68+
<mj-group>
69+
<mj-column width="159px">
70+
<mj-image
71+
css-class="hide-mobile"
72+
href="https://apps.apple.com/us/app/bitwarden-password-manager/id1137397744"
73+
src="https://assets.bitwarden.com/email/v1/ac-apple-store.png"
74+
alt="Download on the App Store"
75+
width="135px"
76+
height="40px"
77+
padding="0 24px 0 0"
78+
/>
79+
</mj-column>
80+
<mj-column width="140px">
81+
<mj-image
82+
css-class="hide-mobile"
83+
href="https://play.google.com/store/apps/details?id=com.x8bit.bitwarden"
84+
src="https://assets.bitwarden.com/email/v1/ac-google-play.png"
85+
alt="Get it on Google Play"
86+
width="140px"
87+
height="40px"
88+
padding="0"
89+
/>
90+
</mj-column>
91+
</mj-group>
92+
</mj-section>
93+
</mj-wrapper>
94+
95+
96+
<!-- Learn More Section -->
97+
<mj-wrapper padding="8px 20px 10px 20px">
98+
<mj-bw-ac-learn-more-footer />
99+
</mj-wrapper>
100+
101+
<!-- Footer -->
102+
<mj-include path="../../../components/footer.mjml" />
103+
</mj-body>
55104
</mjml>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
<mj-attributes>
3+
<mj-all
4+
font-family="'Helvetica Neue','Inter',Helvetica,Arial,sans-serif" />
5+
<mj-class
6+
name="ac-text"
7+
font-size="16px"
8+
font-weight="400"
9+
line-height="24px"
10+
/>
11+
</mj-attributes>
12+
13+
<mj-style>
14+
@media only screen and (max-width: 480px) {
15+
.hide-mobile { display: none !important; }
16+
}
17+
</mj-style>
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
const { BodyComponent } = require("mjml-core");
2+
class MjBwAcHero extends BodyComponent {
3+
static dependencies = {
4+
// Tell the validator which tags are allowed as our component's parent
5+
"mj-column": ["mj-bw-ac-hero"],
6+
"mj-wrapper": ["mj-bw-ac-hero"],
7+
// Tell the validator which tags are allowed as our component's children
8+
"mj-bw-ac-hero": [],
9+
};
10+
11+
static allowedAttributes = {
12+
"img-src": "string", // REQUIRED: Source for the image displayed in the right-hand side of the blue header area
13+
title: "string", // REQUIRED: large text stating primary purpose of the email
14+
"button-text": "string", // OPTIONAL: text to display in the button
15+
"button-url": "string", // OPTIONAL: URL to navigate to when the button is clicked
16+
"sub-title": "string", // OPTIONAL: smaller text providing additional context for the title
17+
};
18+
19+
static defaultAttributes = {};
20+
21+
componentHeadStyle = breakpoint => {
22+
return `
23+
@media only screen and (max-width:${breakpoint}) {
24+
.mj-bw-ac-hero-responsive-img {
25+
display: none !important;
26+
}
27+
}
28+
`
29+
}
30+
31+
render() {
32+
const buttonElement = this.getAttribute("button-text") && this.getAttribute("button-url") ?
33+
`<mj-button
34+
href="${this.getAttribute("button-url")}"
35+
background-color="#fff"
36+
color="#1A41AC"
37+
border-radius="20px"
38+
align="left"
39+
inner-padding="12px 24px"
40+
>
41+
${this.getAttribute("button-text")}
42+
</mj-button
43+
>` : "";
44+
const subTitleElement = this.getAttribute("sub-title") ?
45+
`<mj-text color="#fff" padding-top="0" padding-bottom="0">
46+
<h2 style="font-weight: normal; font-size: 16px; line-height: 0px">
47+
${this.getAttribute("sub-title")}
48+
</h2>
49+
</mj-text>` : "";
50+
51+
return this.renderMJML(
52+
`
53+
<mj-section
54+
full-width="full-width"
55+
background-color="#175ddc"
56+
border-radius="4px 4px 0px 0px"
57+
>
58+
<mj-column width="70%">
59+
<mj-image
60+
align="left"
61+
src="https://bitwarden.com/images/logo-horizontal-white.png"
62+
width="150px"
63+
height="30px"
64+
></mj-image>
65+
<mj-text color="#fff" padding-top="0" padding-bottom="0">
66+
<h1 style="font-weight: 400; font-size: 24px; line-height: 32px">
67+
${this.getAttribute("title")}
68+
</h1>
69+
` +
70+
subTitleElement +
71+
`
72+
</mj-text>` +
73+
buttonElement +
74+
`
75+
</mj-column>
76+
<mj-column width="30%" vertical-align="bottom">
77+
<mj-image
78+
src="${this.getAttribute("img-src")}"
79+
alt=""
80+
width="155px"
81+
padding="0px 20px 0px 0px"
82+
align="right"
83+
css-class="mj-bw-ac-hero-responsive-img"
84+
/>
85+
</mj-column>
86+
</mj-section>
87+
`,
88+
);
89+
}
90+
}
91+
92+
module.exports = MjBwAcHero;

0 commit comments

Comments
 (0)