diff --git a/clients/web/src/game/components/game_screen.rs b/clients/web/src/game/components/game_screen.rs index 56cd39b..b1dba23 100644 --- a/clients/web/src/game/components/game_screen.rs +++ b/clients/web/src/game/components/game_screen.rs @@ -257,10 +257,6 @@ pub fn GameScreen(state: GameUiState) -> impl IntoView { })} - {move || auth_username.get().map(|u| view! { - "▶ " {u} - })} - impl IntoView { })} - // ── Opponent score (above board) ───────────────────────────────── + // ── Opponent score ───────────────────────────────── + // ── Player score ──────────────────────────────────── + - // ── Status bar — full width, above board (§10b) ────────────────── + // ── Board + side panel ─────────────────────────────────────────── +
+ + + // ── Side panel (scoring panels only) ───────────────────────── +
+ {my_scored_event.map(|event| view! { + + })} + {opp_scored_event.map(|event| view! { + + })} +
+
+ + // ── Status bar — full width ──────────────────
{move || { if let Some(ref reason) = pause_reason { @@ -325,33 +350,6 @@ pub fn GameScreen(state: GameUiState) -> impl IntoView { (!hint.is_empty()).then(|| view! {

{hint}

}) }} - // ── Board + side panel ─────────────────────────────────────────── -
- - - // ── Side panel (scoring panels only) ───────────────────────── -
- {my_scored_event.map(|event| view! { - - })} - {opp_scored_event.map(|event| view! { - - })} -
-
- // ── Action buttons below board (§10c) ────────────────────────────
{waiting_for_confirm.then(|| view! { @@ -396,9 +394,6 @@ pub fn GameScreen(state: GameUiState) -> impl IntoView { }}
- // ── Player score (below board) ──────────────────────────────────── - - // ── Pre-game ceremony overlay ───────────────────────────────────── {is_ceremony.then(|| { let pgr = pre_game_roll_data.unwrap_or(PreGameRollState { diff --git a/clients/web/src/game/components/score_panel.rs b/clients/web/src/game/components/score_panel.rs index 2ce14ef..914c8c0 100644 --- a/clients/web/src/game/components/score_panel.rs +++ b/clients/web/src/game/components/score_panel.rs @@ -1,8 +1,8 @@ use leptos::prelude::*; use trictrac_store::Jan; -use crate::i18n::*; use crate::game::trictrac::types::PlayerScore; +use crate::i18n::*; pub fn jan_label(jan: &Jan) -> String { let i18n = use_i18n(); @@ -35,7 +35,11 @@ pub fn PlayerScorePanel(score: PlayerScore, is_you: bool) -> impl IntoView { // 12 peg holes; filled up to `holes` let pegs: Vec = (1u8..=12) .map(|i| { - let cls = if i <= holes { "peg-hole filled" } else { "peg-hole" }; + let cls = if i <= holes { + "peg-hole filled" + } else { + "peg-hole" + }; view! {
}.into_any() }) .collect(); @@ -49,6 +53,11 @@ pub fn PlayerScorePanel(score: PlayerScore, is_you: bool) -> impl IntoView {
+
+ {t!(i18n, holes_label)} +
{pegs}
+ {format!("{holes}/12")} +
{t!(i18n, points_label)}
@@ -59,11 +68,6 @@ pub fn PlayerScorePanel(score: PlayerScore, is_you: bool) -> impl IntoView { "B" })}
-
- {t!(i18n, holes_label)} -
{pegs}
- {format!("{holes}/12")} -
}