force ready all only in debug builds
changed "ready" to less ambiguous "force ready" for the force ready button during role reveal
This commit is contained in:
parent
390a757928
commit
160675435c
|
|
@ -445,7 +445,12 @@ impl Component for Host {
|
|||
})
|
||||
});
|
||||
html! {
|
||||
<RoleReveal ackd={ackd} waiting={waiting} on_force_ready={on_force_ready}/>
|
||||
<RoleReveal
|
||||
ackd={ackd}
|
||||
waiting={waiting}
|
||||
on_force_ready={on_force_ready}
|
||||
allow_ready_all={self.debug}
|
||||
/>
|
||||
}
|
||||
}
|
||||
HostState::Prompt(prompt, page) => {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ pub struct RoleRevealProps {
|
|||
pub ackd: Box<[CharacterIdentity]>,
|
||||
pub waiting: Box<[CharacterIdentity]>,
|
||||
pub on_force_ready: Option<Callback<CharacterIdentity>>,
|
||||
#[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! {
|
||||
<Button on_click={on_force_all}>{"force ready all"}</Button>
|
||||
}
|
||||
})
|
||||
});
|
||||
html! {
|
||||
<div class="role-reveal-cards">
|
||||
|
|
@ -104,7 +107,7 @@ pub fn RoleRevealCard(props: &RoleRevealCardProps) -> Html {
|
|||
let on_click = Callback::from(move |_| {
|
||||
on_force_ready.emit(target.clone());
|
||||
});
|
||||
html! {<Button on_click={on_click}>{"ready"}</Button>}
|
||||
html! {<Button on_click={on_click}>{"force ready"}</Button>}
|
||||
})
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue