From c182cb47e806d0715b36f80b21bd0e7ccb1a4a09 Mon Sep 17 00:00:00 2001 From: Chris Jean-Marie Date: Mon, 25 Nov 2024 20:41:51 +0000 Subject: [PATCH] Fixed layout for phones Imporved email for new accounts --- backend/src/google_oauth.rs | 6 +++--- backend/src/main.rs | 4 ++-- backend/templates/authorized.html | 14 ++++++++------ backend/templates/dashboard.html | 1 - backend/templates/userwishlist.html | 6 +++++- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/backend/src/google_oauth.rs b/backend/src/google_oauth.rs index 80801d8..3db24b2 100644 --- a/backend/src/google_oauth.rs +++ b/backend/src/google_oauth.rs @@ -5,8 +5,7 @@ // GOOGLE_CLIENT_SECRET=yyy use axum::{ - extract::{Extension, Host, Query, State}, - response::{IntoResponse, Redirect}, + extract::{Extension, Host, Query, State}, response::{IntoResponse, Redirect} }; use axum_extra::TypedHeader; use dotenvy::var; @@ -221,7 +220,8 @@ pub async fn google_auth_return( // send email to admin regarding new user registration let recipients = get_useremails_by_role("admin".to_string(), &db_pool).await; - send_emails("Jean-Marie website - New user registration".to_string(), recipients, "A new user has registered".to_string()); + let body = format!("A new user has registered on the website:
Name: {}
Email: {}
Family Name: {}
Given Name: {}", name, email, family_name, given_name); + send_emails("Jean-Marie website - New user registration".to_string(), recipients, body); query.0 }; diff --git a/backend/src/main.rs b/backend/src/main.rs index 74b3453..db8086c 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -75,8 +75,8 @@ async fn main() { .route("/userwishlist/returned/:item_id", get(user_wishlist_returned_item)) // Secret Gift Exchange - Not ready for public use yet - //.route("/giftexchanges", get(giftexchanges)) - //.route("/giftexchange/:giftexchange_id", get(giftexchange).post(giftexchange_save)) + .route("/giftexchanges", get(giftexchanges)) + .route("/giftexchange/:giftexchange_id", get(giftexchange).post(giftexchange_save)) .nest_service("/assets", ServeDir::new("templates/assets") .fallback(get_service(ServeDir::new("templates/assets")))) diff --git a/backend/templates/authorized.html b/backend/templates/authorized.html index f3429f7..5eaf93c 100644 --- a/backend/templates/authorized.html +++ b/backend/templates/authorized.html @@ -1,15 +1,14 @@ {% extends "base.html" %} {% block content %} -
+ -
+ + +
{% block center %}{% endblock center %}
-
- + + +

Events

diff --git a/backend/templates/dashboard.html b/backend/templates/dashboard.html index 7f9e9ea..2321b8f 100644 --- a/backend/templates/dashboard.html +++ b/backend/templates/dashboard.html @@ -1,6 +1,5 @@ {% extends "authorized.html" %} {% block center %} -

This will be the private information area for the extended Jean-Marie family.

Web links

TLC Creations

diff --git a/backend/templates/userwishlist.html b/backend/templates/userwishlist.html index 44ef8dd..0fb8b3d 100644 --- a/backend/templates/userwishlist.html +++ b/backend/templates/userwishlist.html @@ -30,7 +30,11 @@ {{ person_wishlist_item.item }} {% endif %} - URL + {% if person_wishlist_item.item_url.len() > 0 %} + URL + {% else %} + + {% endif %} {% if person_wishlist_item.received_at > 0 %} Got it!