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! {} }) });