From 4003fc0ef21b6d86aedd5a68e4c45728deeaaafa Mon Sep 17 00:00:00 2001 From: Henri Bourcereau Date: Fri, 22 May 2026 17:30:23 +0200 Subject: [PATCH] fix(web client): profile page without draws --- clients/web/assets/style.css | 2 +- clients/web/src/portal/profile.rs | 11 ++++++----- server/relay-server/src/main.rs | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/clients/web/assets/style.css b/clients/web/assets/style.css index 428d693..e81e0de 100644 --- a/clients/web/assets/style.css +++ b/clients/web/assets/style.css @@ -161,7 +161,7 @@ body { /* ── Stats grid ──────────────────────────────────────────────────── */ .stats-grid { display: grid; - grid-template-columns: repeat(4, 1fr); + grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; } diff --git a/clients/web/src/portal/profile.rs b/clients/web/src/portal/profile.rs index bd3c9c2..c727bbd 100644 --- a/clients/web/src/portal/profile.rs +++ b/clients/web/src/portal/profile.rs @@ -41,7 +41,12 @@ fn ProfileContent(profile: UserProfile, username: String) -> impl IntoView { Locale::en => "en-GB", Locale::fr => "fr-FR", }; - let joined = api::format_ts(profile.created_at, locale_tag, &api::DateFormatOptions::date_only()); + let date_format = api::DateFormatOptions { + date_style: Some("long"), + time_style: None, + }; + let joined = api::format_ts(profile.created_at, locale_tag, &date_format); + // let joined = api::format_ts(profile.created_at, locale_tag, &api::DateFormatOptions::date_only()); view! {
@@ -61,10 +66,6 @@ fn ProfileContent(profile: UserProfile, username: String) -> impl IntoView {
{ profile.losses }
{t!(i18n, stat_losses)}
-
-
{ profile.draws }
-
{t!(i18n, stat_draws)}
-
diff --git a/server/relay-server/src/main.rs b/server/relay-server/src/main.rs index 0dfea0c..32baf70 100644 --- a/server/relay-server/src/main.rs +++ b/server/relay-server/src/main.rs @@ -99,9 +99,9 @@ async fn main() { .route("/ws", get(websocket_handler)) .merge(http::router()) .with_state(app_state) + .fallback_service(ServeDir::new(".").not_found_service(ServeFile::new("index.html"))) .layer(auth_layer) - .layer(cors) - .fallback_service(ServeDir::new(".").not_found_service(ServeFile::new("index.html"))); + .layer(cors); let listener = tokio::net::TcpListener::bind("127.0.0.1:8080") .await