From 0e0daf86f77345a505c6929c3344cd3a6f40027f Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Sun, 23 Oct 2022 21:23:29 +0100 Subject: [PATCH] feat: update emails to not look garbage --- crates/quark/assets/templates/deletion.html | 137 ++++++++++++ .../assets/templates/deletion.original.html | 29 +++ crates/quark/assets/templates/deletion.txt | 5 +- crates/quark/assets/templates/reset.html | 200 ++++++++++++------ .../assets/templates/reset.original.html | 25 +++ crates/quark/assets/templates/reset.txt | 5 +- .../quark/assets/templates/reset_plain.html | 14 -- crates/quark/assets/templates/verify.html | 200 ++++++++++++------ .../assets/templates/verify.original.html | 26 +++ crates/quark/assets/templates/verify.txt | 9 +- .../quark/assets/templates/verify_plain.html | 15 -- crates/quark/src/util/rauth.rs | 6 +- 12 files changed, 505 insertions(+), 166 deletions(-) create mode 100644 crates/quark/assets/templates/deletion.html create mode 100644 crates/quark/assets/templates/deletion.original.html create mode 100644 crates/quark/assets/templates/reset.original.html delete mode 100644 crates/quark/assets/templates/reset_plain.html create mode 100644 crates/quark/assets/templates/verify.original.html delete mode 100644 crates/quark/assets/templates/verify_plain.html diff --git a/crates/quark/assets/templates/deletion.html b/crates/quark/assets/templates/deletion.html new file mode 100644 index 00000000..2fc0de87 --- /dev/null +++ b/crates/quark/assets/templates/deletion.html @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/crates/quark/assets/templates/deletion.original.html b/crates/quark/assets/templates/deletion.original.html new file mode 100644 index 00000000..3c367319 --- /dev/null +++ b/crates/quark/assets/templates/deletion.original.html @@ -0,0 +1,29 @@ + + + + + + +
+ Revolt Logo +
+

Account Deletion

+

+ You requested to have your account deleted, if you did not perform + this action please take measures to secure your account immediately. +

+ Confirm +
+
+ Sent from Revolt
+ Made in the EU +
+
+ + diff --git a/crates/quark/assets/templates/deletion.txt b/crates/quark/assets/templates/deletion.txt index c77a6409..1d16d133 100644 --- a/crates/quark/assets/templates/deletion.txt +++ b/crates/quark/assets/templates/deletion.txt @@ -1,5 +1,6 @@ You requested to have your account deleted, if you did not perform this action please take measures to secure your account immediately. -Confirm here: {{url}} +Please navigate to: {{url}} -Sent by Revolt. \ No newline at end of file +Sent by Revolt. +Made in the EU. diff --git a/crates/quark/assets/templates/reset.html b/crates/quark/assets/templates/reset.html index de515b87..a1480bfc 100644 --- a/crates/quark/assets/templates/reset.html +++ b/crates/quark/assets/templates/reset.html @@ -1,63 +1,137 @@ - - - - - Reset your password. - - - - - - - - - - -
- - - - - - - - - - - -
- Revolt logo -
- - - - - - - -
-

Reset your password!

-
-

- You requested a password reset, if you didn't perform this action you can safely ignore this email. -

-

- Reset your password by navigating to {{url}}. -

-
-
- - - - -
-

Sent by Revolt. · Website: https://revolt.chat

-

Revolt is a user-first chat platform built with modern web technologies.

-
-
- -
- - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + diff --git a/crates/quark/assets/templates/reset.original.html b/crates/quark/assets/templates/reset.original.html new file mode 100644 index 00000000..c8af5907 --- /dev/null +++ b/crates/quark/assets/templates/reset.original.html @@ -0,0 +1,25 @@ + + + + + + +
+ +
+

Password Reset

+

You requested a password reset, click below to continue.

+ Reset +
+
+ Sent from Revolt
+ Made in the EU +
+
+ + diff --git a/crates/quark/assets/templates/reset.txt b/crates/quark/assets/templates/reset.txt index 6da746ec..27a1b2fe 100644 --- a/crates/quark/assets/templates/reset.txt +++ b/crates/quark/assets/templates/reset.txt @@ -1,5 +1,6 @@ You requested a password reset, if you did not perform this action you can safely ignore this email. -Reset your password here: {{url}} +Please navigate to: {{url}} -Sent by Revolt. \ No newline at end of file +Sent by Revolt. +Made in the EU. \ No newline at end of file diff --git a/crates/quark/assets/templates/reset_plain.html b/crates/quark/assets/templates/reset_plain.html deleted file mode 100644 index 3da52cec..00000000 --- a/crates/quark/assets/templates/reset_plain.html +++ /dev/null @@ -1,14 +0,0 @@ -

Reset your password.

-

- You requested a password reset, if you did not perform this action you can safely ignore this email. -

-

- Reset your password here: {{url}} -

-
-

- Sent by Revolt. · Website: https://revolt.chat -

-

- Revolt is a user-first chat platform built with modern web technologies. -

\ No newline at end of file diff --git a/crates/quark/assets/templates/verify.html b/crates/quark/assets/templates/verify.html index 8557df60..12015ce4 100644 --- a/crates/quark/assets/templates/verify.html +++ b/crates/quark/assets/templates/verify.html @@ -1,63 +1,137 @@ - - - - - Verify your account. - - - - - - - - - - -
- - - - - - - - - - - -
- Revolt logo -
- - - - - - - -
-

You're almost there!

-
-

- Verify your account to be able to log into the platform. If you didn't perform this action you can safely ignore this email. -

-

- Please verify your account by navigating to {{url}}. -

-
-
- - - - -
-

Sent by Revolt. · Website: https://revolt.chat

-

Revolt is a user-first chat platform built with modern web technologies.

-
-
- -
- - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + diff --git a/crates/quark/assets/templates/verify.original.html b/crates/quark/assets/templates/verify.original.html new file mode 100644 index 00000000..be2e7047 --- /dev/null +++ b/crates/quark/assets/templates/verify.original.html @@ -0,0 +1,26 @@ + + + + + + +
+ Revolt Logo +
+

Almost there!

+

To complete your sign up, we just need to verify your email.

+ Confirm +
+
+ Sent from Revolt
+ Made in the EU +
+
+ + diff --git a/crates/quark/assets/templates/verify.txt b/crates/quark/assets/templates/verify.txt index 7bfbd58e..a500d5b6 100644 --- a/crates/quark/assets/templates/verify.txt +++ b/crates/quark/assets/templates/verify.txt @@ -1,6 +1,7 @@ -You're almost there! -If you did not perform this action you can safely ignore this email. +Almost there! +To complete your sign up, we just need to verify your email. -Please verify your account here: {{url}} +Please navigate to: {{url}} -Sent by Revolt. \ No newline at end of file +Sent by Revolt. +Made in the EU. diff --git a/crates/quark/assets/templates/verify_plain.html b/crates/quark/assets/templates/verify_plain.html deleted file mode 100644 index 3963f7c2..00000000 --- a/crates/quark/assets/templates/verify_plain.html +++ /dev/null @@ -1,15 +0,0 @@ -

You're almost there!

-

- Verify your account to be able to log into the platform.
- If you did not perform this action you can safely ignore this email. -

-

- Please verify your account here: {{url}} -

-
-

- Sent by Revolt. · Website: https://revolt.chat -

-

- Revolt is a user-first chat platform built with modern web technologies. -

\ No newline at end of file diff --git a/crates/quark/src/util/rauth.rs b/crates/quark/src/util/rauth.rs index 398d4557..02d8b26b 100644 --- a/crates/quark/src/util/rauth.rs +++ b/crates/quark/src/util/rauth.rs @@ -26,19 +26,19 @@ pub fn config() -> Config { title: "Verify your Revolt account.".into(), text: include_str!(crate::asset!("templates/verify.txt")).into(), url: format!("{}/login/verify/", *APP_URL), - html: None, + html: Some(include_str!(crate::asset!("templates/verify.html")).into()), }, reset: Template { title: "Reset your Revolt password.".into(), text: include_str!(crate::asset!("templates/reset.txt")).into(), url: format!("{}/login/reset/", *APP_URL), - html: None, + html: Some(include_str!(crate::asset!("templates/reset.html")).into()), }, deletion: Template { title: "Confirm account deletion.".into(), text: include_str!(crate::asset!("templates/deletion.txt")).into(), url: format!("{}/delete/", *APP_URL), - html: None, + html: Some(include_str!(crate::asset!("templates/deletion.html")).into()), }, welcome: None, },