From 8f6b01a692a2dcf1b101e6f4a889e09ffd5c6ef4 Mon Sep 17 00:00:00 2001 From: Zack Fu Zi Xiang Date: Sat, 4 May 2024 11:54:54 +0800 Subject: [PATCH 1/3] feat: change email subject --- src/mailer.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mailer.rs b/src/mailer.rs index 88bf974e..b42a8439 100644 --- a/src/mailer.rs +++ b/src/mailer.rs @@ -55,10 +55,13 @@ impl Mailer { lettre::Address::new("notify", "appflowy.io")?, )) .to(lettre::message::Mailbox::new( - Some(param.username), + Some(param.username.clone()), email.parse().unwrap(), )) - .subject("AppFlowy Workpace Invitation") + .subject(format!( + "Action required: {} invited you to {} in AppFlowy", + param.username, param.workspace_name + )) .header(ContentType::TEXT_HTML) .body(rendered)?; @@ -70,7 +73,7 @@ impl Mailer { #[derive(serde::Serialize)] pub struct WorkspaceInviteMailerParam { pub user_icon_url: String, - pub username: String, + pub username: String, // Inviter pub workspace_name: String, pub workspace_icon_url: String, pub workspace_member_count: String, From 1b7b2d2fcaccab460fa33f8156fa36697619ea81 Mon Sep 17 00:00:00 2001 From: Zack Fu Zi Xiang Date: Sat, 4 May 2024 14:02:35 +0800 Subject: [PATCH 2/3] feat: improve app launch or download --- .../pages/open_appflowy_or_download.html | 26 +++++-------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/admin_frontend/templates/pages/open_appflowy_or_download.html b/admin_frontend/templates/pages/open_appflowy_or_download.html index 1dda5b15..352ab124 100644 --- a/admin_frontend/templates/pages/open_appflowy_or_download.html +++ b/admin_frontend/templates/pages/open_appflowy_or_download.html @@ -2,30 +2,16 @@ - Open App or Redirect + AppFlowy

Opening AppFlowy

-

If the app does not open, you will be redirected to the download page.

+

If AppFlowy does not open, you can click here to launch the app.

+

If AppFlowy is not installed, you can download AppFlowy manually.

From 0284e5b6946b2a580b44e58093193c08bb6ad7ed Mon Sep 17 00:00:00 2001 From: Zack Fu Zi Xiang Date: Sat, 4 May 2024 15:44:17 +0800 Subject: [PATCH 3/3] fix: web redirect after signup --- admin_frontend/src/web_api.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin_frontend/src/web_api.rs b/admin_frontend/src/web_api.rs index 936009d2..6d06e8c0 100644 --- a/admin_frontend/src/web_api.rs +++ b/admin_frontend/src/web_api.rs @@ -389,7 +389,7 @@ async fn logout_handler( state.session_store.del_user_session(session_id).await?; Ok(( jar.remove(Cookie::from("session_id")), - htmx_redirect("/web/login"), + htmx_redirect("/web"), )) }