From f999c0db5fcb6a00af506dbd5389e226a15052b1 Mon Sep 17 00:00:00 2001 From: Zack Fu Zi Xiang Date: Fri, 19 Apr 2024 17:58:49 +0800 Subject: [PATCH 1/4] feat: added template for mail confirmation --- assets/mailer_templates/confirmation.html | 153 ++++++++++++++++++++++ docker-compose-dev.yml | 1 + 2 files changed, 154 insertions(+) create mode 100644 assets/mailer_templates/confirmation.html diff --git a/assets/mailer_templates/confirmation.html b/assets/mailer_templates/confirmation.html new file mode 100644 index 00000000..dcd218d5 --- /dev/null +++ b/assets/mailer_templates/confirmation.html @@ -0,0 +1,153 @@ + + + + + +*|MC:SUBJECT|* + + + + + + + +
+ + + + +
+

Log in to AppFlowy


Click the button below to securely log in or sign up. This magic link will expire in 5 minutes.

+ +
Log in / Sign up

Confirming this request will securely log you in using {youremail@email}.

+
+
+ diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index a42360bf..1fee71be 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -76,6 +76,7 @@ services: # Prometheus Metrics - GOTRUE_METRICS_ENABLED=true - GOTRUE_METRICS_EXPORTER=prometheus + - GOTRUE_MAILER_TEMPLATES_CONFIRMATION=${GOTRUE_MAILER_TEMPLATES_CONFIRMATION} ports: - 9999:9999 From b8d84ae6bb25e228aa4db047bfc80d5951917dde Mon Sep 17 00:00:00 2001 From: Zack Fu Zi Xiang Date: Fri, 19 Apr 2024 22:26:52 +0800 Subject: [PATCH 2/4] chore: add confirmation url to a href --- assets/mailer_templates/confirmation.html | 4 ++-- dev.env | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/mailer_templates/confirmation.html b/assets/mailer_templates/confirmation.html index dcd218d5..9d12b8cc 100644 --- a/assets/mailer_templates/confirmation.html +++ b/assets/mailer_templates/confirmation.html @@ -115,7 +115,7 @@ body, #bodyTable { background-color: rgb(244, 244, 244); }.mceText, .mceLabel {
-

Log in to AppFlowy


Click the button below to securely log in or sign up. This magic link will expire in 5 minutes.

+
Log in / Sign up

Log in to AppFlowy


Click the button below to securely log in or sign up. This magic link will expire in 5 minutes.

-
Log in / Sign up

Confirming this request will securely log you in using {youremail@email}.

+

Confirming this request will securely log you in.

diff --git a/dev.env b/dev.env index 68731c4f..79733945 100644 --- a/dev.env +++ b/dev.env @@ -89,3 +89,4 @@ CLOUDFLARE_TUNNEL_TOKEN= OPENAI_API_KEY= APPFLOWY_HISTORY_DATABASE_URL=postgres://postgres:password@localhost:5432/postgres +GOTRUE_MAILER_TEMPLATES_CONFIRMATION=https://raw.githubusercontent.com/AppFlowy-IO/AppFlowy-Cloud/mailer-template/assets/mailer_templates/confirmation.html From feb7d3ddd12e51840615caa1aeddbb10d3b94314 Mon Sep 17 00:00:00 2001 From: Zack Fu Zi Xiang Date: Fri, 19 Apr 2024 22:38:28 +0800 Subject: [PATCH 3/4] feat: set title as email confirmation --- assets/mailer_templates/confirmation.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/mailer_templates/confirmation.html b/assets/mailer_templates/confirmation.html index 9d12b8cc..d0c8eb5b 100644 --- a/assets/mailer_templates/confirmation.html +++ b/assets/mailer_templates/confirmation.html @@ -10,7 +10,7 @@ -*|MC:SUBJECT|* +Email Confirmation