Fixed layout for phones

Imporved email for new accounts
This commit is contained in:
Chris Jean-Marie 2024-11-25 20:41:51 +00:00
parent 417875300f
commit c182cb47e8
5 changed files with 18 additions and 13 deletions

View File

@ -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: <br> <b>Name:</b> {} <br> <b>Email:</b> {} <br> <b>Family Name:</b> {} <br> <b>Given Name:</b> {}", name, email, family_name, given_name);
send_emails("Jean-Marie website - New user registration".to_string(), recipients, body);
query.0
};

View File

@ -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"))))

View File

@ -1,15 +1,14 @@
{% extends "base.html" %}
{% block content %}
<div class="container-fluid">
<div class="row align-items-stretch">
<!-- Left panel -->
<div id="menu" class="col-md-2 bg-light">
<!-- internal menu -->
<h2>Menu</h2>
<ul>
<li><a href="/dashboard">Web links</a></li>
<li><a href="/cottagecalendar">Cottage Calendar</a></li>
<li><a href="/wishlists">Wish lists</a></li>
<li><a href="/giftexchanges">Gift Exchanges</a></li>
<!--<li><a href="/giftexchanges">Gift Exchanges</a></li>-->
</ul>
{% for user_role in user_roles %}
{% if user_role.role_name == "admin" %}
@ -17,11 +16,14 @@
{% endif %}
{% endfor %}
</div>
<div class="col-8">
<!-- Center panel -->
<div class="col-md-8">
{% block center %}{% endblock center %}
</div>
<div id="events" class="col-2 bg-light">
<!-- events -->
<!-- Right panel -->
<div id="events" class="col-md-2 bg-light">
<h2>Events</h2>
</div>
</div>

View File

@ -1,6 +1,5 @@
{% extends "authorized.html" %}
{% block center %}
<p>This will be the private information area for the extended Jean-Marie family.</p>
<div>
<h2>Web links</h2>
<h3>TLC Creations</h3>

View File

@ -30,7 +30,11 @@
<td>{{ person_wishlist_item.item }}</td>
{% endif %}
<td><a href="{{ person_wishlist_item.item_url }}">URL</a></td>
{% if person_wishlist_item.item_url.len() > 0 %}
<td><a href="{{ person_wishlist_item.item_url }}">URL</a></td>
{% else %}
<td></td>
{% endif %}
{% if person_wishlist_item.received_at > 0 %}
<td>Got it!</td>