Compare commits

..

No commits in common. "27752727a31743088bd53005d703a0a80748fa69" and "e168bbd9b206ce84ea197dc8221502aa310f1fa5" have entirely different histories.

18 changed files with 40 additions and 76 deletions

View File

@ -3050,17 +3050,6 @@ 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;
}
}
}
@ -3072,10 +3061,6 @@ dialog {
font-size: 2em;
align-items: center;
.clear {
width: 100%;
}
.mode-buttons {
display: flex;
flex-direction: row;
@ -3116,14 +3101,4 @@ 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;
}

View File

@ -188,10 +188,7 @@ pub fn Client2(ClientProps { auto_join }: &ClientProps) -> Html {
<Signin callback={on_signin} />
},
ClientEvent2::GameInProgress => html! {
<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>
<CoverOfDarkness message={"game in progress".to_string()}/>
},
ClientEvent2::Story(story) => html! {
<div class="post-game">
@ -199,11 +196,11 @@ pub fn Client2(ClientProps { auto_join }: &ClientProps) -> Html {
</div>
},
ClientEvent2::Sleep => html! {
<CoverOfDarkness message={"cool. come back when dead.".to_string()}/>
<CoverOfDarkness />
},
ClientEvent2::Disconnected => html! {
<div class="disconnected">
<h1>{"disconnected"}</h1>
<div class="column-list">
<p>{"disconnected"}</p>
</div>
},
ClientEvent2::Connecting => {

View File

@ -623,6 +623,7 @@ 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;">

View File

@ -87,27 +87,18 @@ pub fn VotingMode(VotingModeProps { characters }: &VotingModeProps) -> Html {
.map(|(c, v)| {
html! {
<li>
<span class="id"><IdentitySpan ident={c.identity.clone().into_public()}/>{":"}</span>
<span class="votes"><span class="red">{*v}</span>{" votes"}</span>
<IdentitySpan ident={c.identity.clone().into_public()}/>
{": "}
{*v}
{" votes"}
</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>
@ -115,7 +106,7 @@ pub fn VotingMode(VotingModeProps { characters }: &VotingModeProps) -> Html {
</div>
</div>
</div>
<div class="vote-buttons">
<div class="player-list">
{buttons}
</div>
<ol class="vote-summary">

View File

@ -15,7 +15,7 @@
use werewolves_proto::{message::PublicIdentity, role::Killer};
use yew::prelude::*;
use crate::components::{Icon, IconSource, IconType, IdentitySpan};
use crate::components::{Icon, IconSource, IdentitySpan};
#[function_component]
pub fn AdjudicatorPage1() -> Html {
@ -24,7 +24,7 @@ pub fn AdjudicatorPage1() -> Html {
<h1 class="defensive">{"ADJUDICATOR"}</h1>
<div class="information defensive faint">
<h4>{"PICK A PLAYER"}</h4>
<Icon source={IconSource::Killer} icon_type={IconType::Fit}/>
<Icon source={IconSource::Killer}/>
<h4 class="yellow">{"YOU WILL CHECK IF THEY APPEAR AS A KILLER"}</h4>
</div>
</div>
@ -48,12 +48,12 @@ pub fn AdjudicatorResult(
let icon = match killer {
Killer::Killer => html! {
<Icon
source={IconSource::Killer} icon_type={IconType::Fit}
source={IconSource::Killer}
/>
},
Killer::NotKiller => html! {
<Icon
source={IconSource::RedX} icon_type={IconType::Fit}
source={IconSource::RedX}
/>
},
};

View File

@ -26,10 +26,10 @@ pub fn ArcanistPage1() -> Html {
{"PICK TWO PLAYERS"}
<div class="icons">
<Icon source={IconSource::Village}
icon_type={IconType::Fit}
icon_type={IconType::Informational}
/>
<Icon source={IconSource::Wolves}
icon_type={IconType::Fit}
icon_type={IconType::Informational}
/>
</div>
<span class="yellow">{"YOU WILL COMPARE THEIR ALIGNMENTS"}</span>
@ -57,10 +57,10 @@ pub fn ArcanistResult(
};
let icons = match alignment_eq {
AlignmentEq::Same => html! {
<Icon source={IconSource::Equal} icon_type={IconType::Fit} />
<Icon source={IconSource::Equal} icon_type={IconType::Informational} />
},
AlignmentEq::Different => html! {
<Icon source={IconSource::NotEqual} icon_type={IconType::Fit} />
<Icon source={IconSource::NotEqual} icon_type={IconType::Informational} />
},
};
html! {

View File

@ -23,7 +23,7 @@ pub fn BeholderPage1() -> Html {
<h1 class="intel">{"BEHOLDER"}</h1>
<div class="information intel faint">
{"PICK A PLAYER"}
<Icon source={IconSource::Beholder} icon_type={IconType::Fit}/>
<Icon source={IconSource::Beholder} icon_type={IconType::Informational}/>
{"YOU WILL SEE WHAT INFORMATION THEY MAY HAVE GATHERED"}
<span class="yellow">{"SHOULD THEY DIE TONIGHT"}</span>
</div>
@ -38,7 +38,7 @@ pub fn BeholderWakePage1() -> Html {
<h1 class="intel">{"BEHOLDER"}</h1>
<div class="information intel faint">
{"YOUR TARGET HAS DIED"}
<Icon source={IconSource::Beholder} icon_type={IconType::Fit}/>
<Icon source={IconSource::Beholder} icon_type={IconType::Informational}/>
<span class="yellow">{"THIS IS THE LAST PIECE OF INFORMATION THEY SAW"}</span>
</div>
</div>
@ -53,7 +53,7 @@ pub fn BeholderSawNothing() -> Html {
<div class="information intel faint">
<h1>{"YOUR TARGET HAS DIED"}</h1>
<div class="info-icon-grow">
<Icon source={IconSource::RedX} icon_type={IconType::Fit}/>
<Icon source={IconSource::RedX}/>
</div>
<h1>{"BUT SAW NOTHING"}</h1>
</div>
@ -68,7 +68,7 @@ pub fn BeholderSawEverything() -> Html {
<h1 class="intel">{"BEHOLDER"}</h1>
<div class="information intel faint">
{"YOUR TARGET HAS DIED"}
<Icon source={IconSource::Beholder} icon_type={IconType::Fit}/>
<Icon source={IconSource::Beholder} icon_type={IconType::Informational}/>
<span>
{"BUT SAW "}
<em class="red">

View File

@ -47,12 +47,12 @@ pub fn EmpathResult(EmpathResultProps { scapegoat, target }: &EmpathResultProps)
let icon = match scapegoat {
true => html! {
<Icon
source={IconSource::Scapegoat} icon_type={IconType::Fit}
source={IconSource::Scapegoat} icon_type={IconType::Informational}
/>
},
false => html! {
<Icon
source={IconSource::RedX} icon_type={IconType::Fit}
source={IconSource::RedX} icon_type={IconType::Informational}
/>
},
};

View File

@ -29,7 +29,7 @@ pub fn GravediggerPage1() -> Html {
<span class="yellow">{"DEAD"}</span>
{" PLAYER"}
</span>
<Icon source={IconSource::Gravedigger} icon_type={IconType::Fit}/>
<Icon source={IconSource::Gravedigger} icon_type={IconType::Informational}/>
<span class="yellow">
{"YOU WILL LEARN THEIR ROLE"}
</span>
@ -74,7 +74,7 @@ pub fn GravediggerResultPage(
<h1 class="intel">{"GRAVEDIGGER"}</h1>
<div class="information intel faint">
<IdentitySpan ident={target.clone()}/>
<Icon source={icon} icon_type={IconType::Fit}/>
<Icon source={icon} icon_type={IconType::Informational}/>
{text}
</div>
</div>

View File

@ -90,7 +90,7 @@ pub fn GuardianPagePreviousGuard(GuardianPageProps { previous }: &GuardianPagePr
<h1 class="defensive">{"GUARDIAN"}</h1>
<div class="information defensive faint">
{"LAST TIME YOU GUARDED"}
<Icon source={IconSource::ShieldAndSword} icon_type={IconType::Fit}/>
<Icon source={IconSource::ShieldAndSword} icon_type={IconType::Informational}/>
<div class="info-player-list">
<CharacterTargetCard ident={previous.clone()} />
</div>

View File

@ -23,7 +23,7 @@ pub fn HunterPage1() -> Html {
<h1 class="offensive">{"HUNTER"}</h1>
<div class="information offensive faint">
{"SET A HUNTER'S TRAP ON A PLAYER"}
<Icon source={IconSource::Hunter} icon_type={IconType::Fit}/>
<Icon source={IconSource::Hunter} icon_type={IconType::Informational}/>
<span class="yellow">
{"IF YOU DIE TONIGHT, OR ARE EXECUTED TOMORROW "}
{"THIS PLAYER WILL DIE AT NIGHT"}

View File

@ -24,7 +24,7 @@ pub fn InsomniacPage1() -> Html {
<h1 class="intel">{"INSOMNIAC"}</h1>
<div class="information intel faint">
{"YOUR SLEEP IS INTERRUPTED"}
<Icon source={IconSource::Insomniac} icon_type={IconType::Fit}/>
<Icon source={IconSource::Insomniac} icon_type={IconType::Informational}/>
{"YOU'VE NOTICED VISITORS IN THE NIGHT"}
</div>
</div>

View File

@ -27,7 +27,7 @@ pub fn MilitiaPage1() -> Html {
<span class="yellow">{"ONCE PER GAME"}</span>
{" KILL ABILITY"}
</span>
<Icon source={IconSource::Sword} icon_type={IconType::Fit}/>
<Icon source={IconSource::Sword} icon_type={IconType::Informational}/>
<span class="yellow">
{"PICK A PLAYER "}
{"OR GO BACK TO SLEEP"}

View File

@ -24,7 +24,7 @@ pub fn MorticianPage1() -> Html {
<h1 class="intel">{"MORTICIAN"}</h1>
<div class="information intel faint">
<span>{"PICK A "}<span class="yellow">{"DEAD"}</span>{" PLAYER"}</span>
<Icon source={IconSource::Mortician} icon_type={IconType::Fit}/>
<Icon source={IconSource::Mortician} icon_type={IconType::Informational}/>
<span class="yellow">
{"YOU WILL LEARN THE CAUSE "}
{"OF THEIR DEATH"}
@ -66,7 +66,7 @@ pub fn MorticianResultPage(
<div class="information intel faint">
<IdentitySpan ident={target.clone()}/>
{"DIED TO"}
<Icon source={icon} icon_type={IconType::Fit}/>
<Icon source={icon} icon_type={IconType::Informational}/>
<span class="yellow">{text}</span>
</div>
</div>

View File

@ -16,7 +16,7 @@
use werewolves_proto::{message::PublicIdentity, role::Powerful};
use yew::prelude::*;
use crate::components::{Icon, IconSource, IconType, IdentitySpan};
use crate::components::{Icon, IconSource, IdentitySpan};
#[function_component]
pub fn PowerSeerPage1() -> Html {
@ -26,7 +26,7 @@ pub fn PowerSeerPage1() -> Html {
<div class="information intel faint">
{"PICK A PLAYER"}
<div class="info-icon-grow">
<Icon source={IconSource::Powerful} icon_type={IconType::Fit}/>
<Icon source={IconSource::Powerful} />
</div>
<span class="yellow">{"YOU WILL CHECK IF THEY ARE POWERFUL"}</span>
</div>
@ -49,12 +49,12 @@ pub fn PowerSeerResult(PowerSeerResultProps { powerful, target }: &PowerSeerResu
let icon = match powerful {
Powerful::Powerful => html! {
<Icon
source={IconSource::Powerful} icon_type={IconType::Fit}
source={IconSource::Powerful}
/>
},
Powerful::NotPowerful => html! {
<Icon
source={IconSource::RedX} icon_type={IconType::Fit}
source={IconSource::RedX}
/>
},
};

View File

@ -23,7 +23,7 @@ pub fn ProtectorPage1() -> Html {
<h1 class="defensive">{"PROTECTOR"}</h1>
<div class="information defensive faint">
{"PICK A PLAYER"}
<Icon source={IconSource::Shield} icon_type={IconType::Fit}/>
<Icon source={IconSource::Shield} icon_type={IconType::Informational}/>
<span class="yellow">{"YOU WILL PROTECT THEM FROM A DEATH TONIGHT"}</span>
</div>
</div>

View File

@ -23,7 +23,7 @@ pub fn PyremasterPage1() -> Html {
<h1 class="offensive">{"PYREMASTER"}</h1>
<div class="information offensive faint">
{"YOU CAN CHOOSE TO THROW A PLAYER ON THE PYRE"}
<Icon source={IconSource::Pyremaster} icon_type={IconType::Fit}/>
<Icon source={IconSource::Pyremaster} icon_type={IconType::Informational}/>
<span>
{"IF YOU KILL "}
<span class="yellow">{"TWO"}</span>

View File

@ -30,8 +30,8 @@ pub fn SeerPage1() -> Html {
<div class="information intel faint">
{"PICK A PLAYER"}
<div class="icons">
<Icon source={IconSource::Village} icon_type={IconType::Fit} />
<Icon source={IconSource::Wolves} icon_type={IconType::Fit} />
<Icon source={IconSource::Village} icon_type={IconType::Informational} />
<Icon source={IconSource::Wolves} icon_type={IconType::Informational} />
</div>
<span class="yellow">{"YOU WILL CHECK THEIR ALIGNMENT"}</span>
</div>