votes summary improved, message for dead chat
This commit is contained in:
parent
e168bbd9b2
commit
76ac113a8e
|
|
@ -3050,6 +3050,17 @@ dialog {
|
|||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: baseline;
|
||||
|
||||
.id {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: baseline;
|
||||
}
|
||||
|
||||
.votes {
|
||||
margin-left: 1ch;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3061,6 +3072,10 @@ dialog {
|
|||
font-size: 2em;
|
||||
align-items: center;
|
||||
|
||||
.clear {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mode-buttons {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
|
@ -3101,4 +3116,14 @@ dialog {
|
|||
flex-direction: column;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
min-width: 5cm;
|
||||
max-width: 9cm;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.vote-buttons {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
gap: 1ch;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -188,7 +188,10 @@ pub fn Client2(ClientProps { auto_join }: &ClientProps) -> Html {
|
|||
<Signin callback={on_signin} />
|
||||
},
|
||||
ClientEvent2::GameInProgress => html! {
|
||||
<CoverOfDarkness message={"game in progress".to_string()}/>
|
||||
<div class="game-in-progress">
|
||||
<h1>{"game in progress"}</h1>
|
||||
<h3>{"if you're playing, you can come back when dead for dead chat"}</h3>
|
||||
</div>
|
||||
},
|
||||
ClientEvent2::Story(story) => html! {
|
||||
<div class="post-game">
|
||||
|
|
@ -196,11 +199,11 @@ pub fn Client2(ClientProps { auto_join }: &ClientProps) -> Html {
|
|||
</div>
|
||||
},
|
||||
ClientEvent2::Sleep => html! {
|
||||
<CoverOfDarkness />
|
||||
<CoverOfDarkness message={"cool. come back when dead.".to_string()}/>
|
||||
},
|
||||
ClientEvent2::Disconnected => html! {
|
||||
<div class="column-list">
|
||||
<p>{"disconnected"}</p>
|
||||
<div class="disconnected">
|
||||
<h1>{"disconnected"}</h1>
|
||||
</div>
|
||||
},
|
||||
ClientEvent2::Connecting => {
|
||||
|
|
|
|||
|
|
@ -623,7 +623,6 @@ impl Component for Host {
|
|||
}
|
||||
_ => None,
|
||||
};
|
||||
log::info!("voting mode button: {}", voting_mode_btn.is_some());
|
||||
let nav = self.big_screen.not().then(|| {
|
||||
html! {
|
||||
<nav class="host-nav" style="z-index: 3;">
|
||||
|
|
|
|||
|
|
@ -87,18 +87,27 @@ pub fn VotingMode(VotingModeProps { characters }: &VotingModeProps) -> Html {
|
|||
.map(|(c, v)| {
|
||||
html! {
|
||||
<li>
|
||||
<IdentitySpan ident={c.identity.clone().into_public()}/>
|
||||
{": "}
|
||||
{*v}
|
||||
{" votes"}
|
||||
<span class="id"><IdentitySpan ident={c.identity.clone().into_public()}/>{":"}</span>
|
||||
<span class="votes"><span class="red">{*v}</span>{" votes"}</span>
|
||||
</li>
|
||||
}
|
||||
})
|
||||
.collect::<Html>();
|
||||
let on_clear = {
|
||||
let votes = votes.clone();
|
||||
move |_| {
|
||||
let mut v = (*votes).clone();
|
||||
for (_, v) in v.iter_mut() {
|
||||
*v = 0;
|
||||
}
|
||||
votes.set(v);
|
||||
}
|
||||
};
|
||||
html! {
|
||||
<div class="character-picker">
|
||||
<div class="top-of-day-info">
|
||||
<div class="voting-mode">
|
||||
<Button classes={classes!("clear")} on_click={on_clear}>{"clear votes"}</Button>
|
||||
<span class="red">{"voting mode"}</span>
|
||||
<div class="mode-buttons">
|
||||
<Button classes={classes!(add)} on_click={set_add}>{"add"}</Button>
|
||||
|
|
@ -106,7 +115,7 @@ pub fn VotingMode(VotingModeProps { characters }: &VotingModeProps) -> Html {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="player-list">
|
||||
<div class="vote-buttons">
|
||||
{buttons}
|
||||
</div>
|
||||
<ol class="vote-summary">
|
||||
|
|
|
|||
Loading…
Reference in New Issue