fix(web client): profile page without draws

This commit is contained in:
Henri Bourcereau 2026-05-22 17:30:23 +02:00
parent 25554126a8
commit 4003fc0ef2
3 changed files with 9 additions and 8 deletions

View file

@ -161,7 +161,7 @@ body {
/* ── Stats grid ──────────────────────────────────────────────────── */ /* ── Stats grid ──────────────────────────────────────────────────── */
.stats-grid { .stats-grid {
display: grid; display: grid;
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(3, 1fr);
gap: 1rem; gap: 1rem;
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
} }

View file

@ -41,7 +41,12 @@ fn ProfileContent(profile: UserProfile, username: String) -> impl IntoView {
Locale::en => "en-GB", Locale::en => "en-GB",
Locale::fr => "fr-FR", 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! { view! {
<div class="portal-card"> <div class="portal-card">
@ -61,10 +66,6 @@ fn ProfileContent(profile: UserProfile, username: String) -> impl IntoView {
<div class="value outcome-loss">{ profile.losses }</div> <div class="value outcome-loss">{ profile.losses }</div>
<div class="label">{t!(i18n, stat_losses)}</div> <div class="label">{t!(i18n, stat_losses)}</div>
</div> </div>
<div class="stat-box">
<div class="value outcome-draw">{ profile.draws }</div>
<div class="label">{t!(i18n, stat_draws)}</div>
</div>
</div> </div>
</div> </div>

View file

@ -99,9 +99,9 @@ async fn main() {
.route("/ws", get(websocket_handler)) .route("/ws", get(websocket_handler))
.merge(http::router()) .merge(http::router())
.with_state(app_state) .with_state(app_state)
.fallback_service(ServeDir::new(".").not_found_service(ServeFile::new("index.html")))
.layer(auth_layer) .layer(auth_layer)
.layer(cors) .layer(cors);
.fallback_service(ServeDir::new(".").not_found_service(ServeFile::new("index.html")));
let listener = tokio::net::TcpListener::bind("127.0.0.1:8080") let listener = tokio::net::TcpListener::bind("127.0.0.1:8080")
.await .await