diff --git a/clients/web/src/game/components/game_screen.rs b/clients/web/src/game/components/game_screen.rs index 2a1d761..011f962 100644 --- a/clients/web/src/game/components/game_screen.rs +++ b/clients/web/src/game/components/game_screen.rs @@ -246,7 +246,11 @@ pub fn GameScreen(state: GameUiState) -> impl IntoView { let opp_name_end = opp_score.name.clone(); let opp_holes_end = opp_score.holes; - let share_open = RwSignal::new(false); + // Open by default for the room creator while waiting for an opponent. + // When the opponent joins the stage becomes PreGameRoll, so the next + // re-mount will initialise this to false — auto-closing the popover. + let share_open = RwSignal::new(!is_bot_game && player_id == 0 && stage == SerStage::PreGame); + let share_copied = RwSignal::new(false); let share_url = if !is_bot_game { room_url(&room_id) } else { @@ -290,17 +294,46 @@ pub fn GameScreen(state: GameUiState) -> impl IntoView { // ── Share popover ───────────────────────────────────────────────── - {move || share_open.get().then(|| view! { -
-

{t!(i18n, share_link)}

-
- + {move || share_open.get().then(|| { + let url = share_url.clone(); + let url_copy = share_url.clone(); + view! { +