From 160675435c9c403e92d3550a06c6e5a6110f123c Mon Sep 17 00:00:00 2001 From: emilis Date: Tue, 9 Dec 2025 21:35:06 +0000 Subject: [PATCH] force ready all only in debug builds changed "ready" to less ambiguous "force ready" for the force ready button during role reveal --- werewolves/src/clients/host/host.rs | 7 ++++++- werewolves/src/components/reveal.rs | 11 +++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/werewolves/src/clients/host/host.rs b/werewolves/src/clients/host/host.rs index 74f7e79..9cc8ffb 100644 --- a/werewolves/src/clients/host/host.rs +++ b/werewolves/src/clients/host/host.rs @@ -445,7 +445,12 @@ impl Component for Host { }) }); html! { - + } } HostState::Prompt(prompt, page) => { diff --git a/werewolves/src/components/reveal.rs b/werewolves/src/components/reveal.rs index 6591e53..39f5ab1 100644 --- a/werewolves/src/components/reveal.rs +++ b/werewolves/src/components/reveal.rs @@ -24,6 +24,8 @@ pub struct RoleRevealProps { pub ackd: Box<[CharacterIdentity]>, pub waiting: Box<[CharacterIdentity]>, pub on_force_ready: Option>, + #[prop_or_default] + pub allow_ready_all: bool, } pub struct RoleReveal {} @@ -42,6 +44,7 @@ impl Component for RoleReveal { ackd, waiting, on_force_ready, + allow_ready_all, } = ctx.props(); let mut chars = ackd .iter() @@ -73,10 +76,10 @@ impl Component for RoleReveal { } }) }) - .map(|on_force_all| { - html! { + .and_then(|on_force_all| { + allow_ready_all.then_some(html! { - } + }) }); html! {
@@ -104,7 +107,7 @@ pub fn RoleRevealCard(props: &RoleRevealCardProps) -> Html { let on_click = Callback::from(move |_| { on_force_ready.emit(target.clone()); }); - html! {} + html! {} }) });