From 03c740dffbe65e35faed038123970c95606168a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bispo?= Date: Thu, 13 Apr 2023 18:19:49 +0100 Subject: [PATCH] [PM-1095] [PM-1104] Update new template UI (#2852) --- .../Handlebars/Layouts/Full.html.hbs | 63 +----- .../Handlebars/Layouts/FullUpdated.html.hbs | 201 ++++++++++++++++++ .../Handlebars/Layouts/FullUpdated.text.hbs | 13 ++ .../Layouts/TitleContactUs.html.hbs | 66 +++--- .../OrganizationUserConfirmed.html.hbs | 56 +++-- .../OrganizationUserInvited.html.hbs | 28 +-- .../Implementations/HandlebarsMailService.cs | 4 + 7 files changed, 314 insertions(+), 117 deletions(-) create mode 100644 src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.html.hbs create mode 100644 src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.text.hbs diff --git a/src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs b/src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs index 2655324a6e..5e4c0eb0ae 100644 --- a/src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs +++ b/src/Core/MailTemplates/Handlebars/Layouts/Full.html.hbs @@ -5,6 +5,7 @@ Bitwarden + + + + + + + +
+ + + + + + +
+ + + + +
+ + + + +
+ + {{>@partial-block}} + +
+ + + + + + + + +
+
+ + \ No newline at end of file diff --git a/src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.text.hbs b/src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.text.hbs new file mode 100644 index 0000000000..bf4ec50796 --- /dev/null +++ b/src/Core/MailTemplates/Handlebars/Layouts/FullUpdated.text.hbs @@ -0,0 +1,13 @@ +{{>@partial-block}} + +---------------------------- + +- Twitter: https://twitter.com/bitwarden +- Reddit: https://www.reddit.com/r/Bitwarden/ +- Community Forums: https://community.bitwarden.com/ +- GitHub: https://github.com/bitwarden +- Youtube: https://www.youtube.com/channel/UCId9a_jQqvJre0_dE2lE_Rw +- LinkedIn: https://www.linkedin.com/company/bitwarden1/ +- Facebook: https://www.facebook.com/bitwarden/ + +{{CurrentYear}} Bitwarden Inc. \ No newline at end of file diff --git a/src/Core/MailTemplates/Handlebars/Layouts/TitleContactUs.html.hbs b/src/Core/MailTemplates/Handlebars/Layouts/TitleContactUs.html.hbs index 962ca564ec..ed0d7cd9af 100644 --- a/src/Core/MailTemplates/Handlebars/Layouts/TitleContactUs.html.hbs +++ b/src/Core/MailTemplates/Handlebars/Layouts/TitleContactUs.html.hbs @@ -1,26 +1,44 @@ -{{#>FullHtmlLayout}} -
-
-
-
- {{TitleFirst}}{{TitleSecondBold}}{{TitleThird}} -
-
-
- -
-
+{{#>FullUpdatedHtmlLayout}} + + + + + +
+ + + + +
+ {{TitleFirst}}{{TitleSecondBold}}{{TitleThird}} +
+
+ +
- {{>@partial-block}} +{{>@partial-block}} -
- -
- -
-
-
-{{/FullHtmlLayout}} \ No newline at end of file + + + + + +
+ + + + + +
+{{/FullUpdatedHtmlLayout}} \ No newline at end of file diff --git a/src/Core/MailTemplates/Handlebars/OrganizationUserConfirmed.html.hbs b/src/Core/MailTemplates/Handlebars/OrganizationUserConfirmed.html.hbs index 1cef152327..db23daaff3 100644 --- a/src/Core/MailTemplates/Handlebars/OrganizationUserConfirmed.html.hbs +++ b/src/Core/MailTemplates/Handlebars/OrganizationUserConfirmed.html.hbs @@ -1,25 +1,35 @@ {{#>TitleContactUsHtmlLayout}} -
-
- You may now access logins and other items this organizations has shared with you from your Bitwarden vault. -
-
-
-
- - Go to vault - -
-
-
-
- Tip: Use the Bitwarden mobile app to quickly save logins and auto-fill forms. Download from the App Store or Google Play. -
-
-
-
- Android download - iOS download -
-
+ + + + +
+ You may now access logins and other items this organization has shared with you from your Bitwarden vault. +
+ + + + +
+ + Go to vault + +
+ + + + +
+ Tip: Use the Bitwarden mobile app to quickly save logins and auto-fill forms. Download from the App Store or Google Play. +
+ + + + + +
+ Android download + + iOS download +
{{/TitleContactUsHtmlLayout}} diff --git a/src/Core/MailTemplates/Handlebars/OrganizationUserInvited.html.hbs b/src/Core/MailTemplates/Handlebars/OrganizationUserInvited.html.hbs index 8db383b199..33c3a9256d 100644 --- a/src/Core/MailTemplates/Handlebars/OrganizationUserInvited.html.hbs +++ b/src/Core/MailTemplates/Handlebars/OrganizationUserInvited.html.hbs @@ -1,15 +1,19 @@ {{#>TitleContactUsHtmlLayout}} -
-
- - Join Organization Now - -
-
-
-
- This invitation expires on {{ExpirationDate}} -
-
+ + + + +
+ + Join Organization Now + +
+ + + + +
+ This invitation expires on {{ExpirationDate}} +
{{/TitleContactUsHtmlLayout}} diff --git a/src/Core/Services/Implementations/HandlebarsMailService.cs b/src/Core/Services/Implementations/HandlebarsMailService.cs index e15067840b..6f182310d7 100644 --- a/src/Core/Services/Implementations/HandlebarsMailService.cs +++ b/src/Core/Services/Implementations/HandlebarsMailService.cs @@ -484,6 +484,10 @@ public class HandlebarsMailService : IMailService Handlebars.RegisterTemplate("FullHtmlLayout", fullHtmlLayoutSource); var fullTextLayoutSource = await ReadSourceAsync("Layouts.Full.text"); Handlebars.RegisterTemplate("FullTextLayout", fullTextLayoutSource); + var fullUpdatedHtmlLayoutSource = await ReadSourceAsync("Layouts.FullUpdated.html"); + Handlebars.RegisterTemplate("FullUpdatedHtmlLayout", fullUpdatedHtmlLayoutSource); + var fullUpdatedTextLayoutSource = await ReadSourceAsync("Layouts.FullUpdated.text"); + Handlebars.RegisterTemplate("FullUpdatedTextLayout", fullUpdatedTextLayoutSource); var titleContactUsHtmlLayoutSource = await ReadSourceAsync("Layouts.TitleContactUs.html"); Handlebars.RegisterTemplate("TitleContactUsHtmlLayout", titleContactUsHtmlLayoutSource); var titleContactUsTextLayoutSource = await ReadSourceAsync("Layouts.TitleContactUs.text");