From 3fe13be701ecdc3cf6750682e553a89dbcf6ee25 Mon Sep 17 00:00:00 2001 From: noahtalerman <47070608+noahtalerman@users.noreply.github.com> Date: Tue, 15 Jun 2021 14:29:20 -0400 Subject: [PATCH] Update links to main branch in email templates (#1086) - Update links to documentation - Update link to assets by editing `getAssetURL()` - Prettier did some reformatting of the email template code which is resulting in a larger amount of lines changed --- .../templates/change_email_confirmation.html | 100 +++++++++++++--- server/mail/templates/invite_token.html | 106 ++++++++++++++--- server/mail/templates/password_reset.html | 108 +++++++++++++++--- server/mail/templates/smtp_setup.html | 95 ++++++++++++--- server/service/service.go | 2 +- 5 files changed, 337 insertions(+), 74 deletions(-) diff --git a/server/mail/templates/change_email_confirmation.html b/server/mail/templates/change_email_confirmation.html index 4f9935686a..841ad12916 100644 --- a/server/mail/templates/change_email_confirmation.html +++ b/server/mail/templates/change_email_confirmation.html @@ -1,11 +1,14 @@ - - + + - +
- +
- - - -
- + +
+

Change Confirmation

Hello,

-

This message is to confirm that the email address you recently changed actually works. Please click the link below to confirm that you want to change your email address in Kolide.

+

+ This message is to confirm that the email address you recently + changed actually works. Please click the link below to confirm + that you want to change your email address in Kolide. +

-
- {{.BaseURL}}/email/change/{{.Token}} + + {{.BaseURL}}/email/change/{{.Token}}
- Fleet Documentation + + Fleet Documentation - + +
-
+
diff --git a/server/mail/templates/invite_token.html b/server/mail/templates/invite_token.html index 9069f10233..ac62f65e70 100644 --- a/server/mail/templates/invite_token.html +++ b/server/mail/templates/invite_token.html @@ -1,11 +1,14 @@ - - + + - +
- +
- -
- + +
+

You Have Been Invited To Fleet!

Hello,

-

{{.InvitedByUsername}} has invited you to join {{.OrgName}}. Please click the link below to accept the invitation and setup your account.

+

+ {{.InvitedByUsername}} has invited you to join + {{.OrgName}}. Please click the link below to + accept the invitation and setup your account. +

- @@ -70,15 +114,39 @@ - -
+ {{if .SSOEnabled}} - {{.BaseURL}}/login/ssoinvites/{{.Token}}?name={{.Name}}&email={{.Email}} + {{.BaseURL}}/login/ssoinvites/{{.Token}}?name={{.Name}}&email={{.Email}} {{else}} - {{.BaseURL}}/login/invites/{{.Token}}?name={{.Name}}&email={{.Email}} + {{.BaseURL}}/login/invites/{{.Token}}?name={{.Name}}&email={{.Email}} {{end}}
- Fleet Documentation + + Fleet Documentation - + +
-
+
diff --git a/server/mail/templates/password_reset.html b/server/mail/templates/password_reset.html index c72172f4ee..ee9d918eff 100644 --- a/server/mail/templates/password_reset.html +++ b/server/mail/templates/password_reset.html @@ -1,11 +1,14 @@ - - + + - +
- +
- - - -
- + +
-

Reset Your Fleet Password...

-

Someone requested a password reset on your Fleet account. Follow the link below to reset your password:

-

Reset Password

-

If you did not make the request, you may ignore this email as no changes have been made.

+
+

Reset Your Fleet Password...

+

+ Someone requested a password reset on your Fleet account. + Follow the link below to reset your password: +

+

+ Reset Password +

+

+ If you did not make the request, you may ignore this email + as no changes have been made. +

- Fleet Documentation + + Fleet Documentation - + +
-
+
diff --git a/server/mail/templates/smtp_setup.html b/server/mail/templates/smtp_setup.html index b96ec74f74..d8beec96a1 100644 --- a/server/mail/templates/smtp_setup.html +++ b/server/mail/templates/smtp_setup.html @@ -1,11 +1,14 @@ - - + + - +
- +
- - - -
- + +
-

Confirmed Fleet SMTP Setup

-

This message confirms that SMTP is set up properly on your Fleet instance.

+
+

Confirmed Fleet SMTP Setup

+

+ This message confirms that SMTP is set up properly on your + Fleet instance. +

- Fleet Documentation + + Fleet Documentation - + +
-
+
diff --git a/server/service/service.go b/server/service/service.go index e3a0cfd6f2..1cdfad5df1 100644 --- a/server/service/service.go +++ b/server/service/service.go @@ -89,7 +89,7 @@ func getAssetURL() template.URL { v := version.Version().Version tag := strings.Split(v, "-")[0] if tag == "unknown" { - tag = "master" + tag = "main" } return template.URL("https://github.com/fleetdm/fleet/blob/" + tag)