diff --git a/Cargo.lock b/Cargo.lock index 128d538..1113b6f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -69,9 +69,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.87" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8" +checksum = "4e1496f8fb1fbf272686b8d37f523dab3e4a7443300055e74cdaa449f3114356" [[package]] name = "approx" @@ -1309,9 +1309,9 @@ dependencies = [ [[package]] name = "leptos-use" -version = "0.14.0-beta2" +version = "0.14.0-beta3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "424197a4dfb2cb8814d6be2baae4bcae9d56ce196b3febb7c020ebc282fe334c" +checksum = "54f877ebb68595efafd4828b6bbd50286bdc064572edd42242a70ae1a2c3b9d5" dependencies = [ "cfg-if", "codee", @@ -2032,9 +2032,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" dependencies = [ "bitflags", ] @@ -2449,7 +2449,7 @@ dependencies = [ [[package]] name = "thaw" version = "0.4.0-beta2" -source = "git+https://github.com/adoyle0/thaw.git#aa818b28239fedd76d4e7ee3f7b541a9fd67c6bc" +source = "git+https://github.com/adoyle0/thaw.git#e9d1630473fd45c05e83999408ef19c8213fc1a1" dependencies = [ "cfg-if", "chrono", @@ -2471,7 +2471,7 @@ dependencies = [ [[package]] name = "thaw_components" version = "0.2.0-beta2" -source = "git+https://github.com/adoyle0/thaw.git#aa818b28239fedd76d4e7ee3f7b541a9fd67c6bc" +source = "git+https://github.com/adoyle0/thaw.git#e9d1630473fd45c05e83999408ef19c8213fc1a1" dependencies = [ "cfg-if", "leptos", @@ -2484,7 +2484,7 @@ dependencies = [ [[package]] name = "thaw_macro" version = "0.1.0-beta2" -source = "git+https://github.com/adoyle0/thaw.git#aa818b28239fedd76d4e7ee3f7b541a9fd67c6bc" +source = "git+https://github.com/adoyle0/thaw.git#e9d1630473fd45c05e83999408ef19c8213fc1a1" dependencies = [ "proc-macro2", "quote", @@ -2494,7 +2494,7 @@ dependencies = [ [[package]] name = "thaw_utils" version = "0.1.0-beta2" -source = "git+https://github.com/adoyle0/thaw.git#aa818b28239fedd76d4e7ee3f7b541a9fd67c6bc" +source = "git+https://github.com/adoyle0/thaw.git#e9d1630473fd45c05e83999408ef19c8213fc1a1" dependencies = [ "cfg-if", "chrono", @@ -2897,9 +2897,9 @@ checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" diff --git a/client/src/components/auth.rs b/client/src/components/auth.rs index 8c065bd..fb52ebd 100644 --- a/client/src/components/auth.rs +++ b/client/src/components/auth.rs @@ -42,7 +42,7 @@ pub fn Auth() -> impl IntoView { @@ -52,8 +52,8 @@ pub fn Auth() -> impl IntoView { position=PopoverPosition::BottomStart > -

- "Sign In" +

+ "Change Name" @@ -168,15 +168,6 @@ pub fn Browser() -> impl IntoView { - -
- - - - - -
- } diff --git a/client/src/components/browser/create_game.rs b/client/src/components/browser/create_game.rs index 9fdb26d..43402c1 100644 --- a/client/src/components/browser/create_game.rs +++ b/client/src/components/browser/create_game.rs @@ -42,8 +42,6 @@ pub fn CreateGame() -> impl IntoView { let toggle_show_packs = move |_| show_packs.set(!show_packs()); - let drawer_context = expect_context::>(); - let nav_context = expect_context::>(); let request_new_game = move |_| { set_websocket_send( @@ -54,7 +52,6 @@ pub fn CreateGame() -> impl IntoView { .unwrap(), ); input_game_name.set(String::new()); - drawer_context.set(false); nav_context.set("game".to_string()); }; diff --git a/client/src/components/chat.rs b/client/src/components/chat.rs index 3e90c5b..a9a096e 100644 --- a/client/src/components/chat.rs +++ b/client/src/components/chat.rs @@ -1,5 +1,5 @@ use crate::components::websocket::WebSocketContext; -use leptos::{ev, html::Textarea, prelude::*}; +use leptos::{html::Textarea, prelude::*}; use leptos_use::core::ConnectionReadyState; use lib::*; use serde_json::to_string; @@ -59,8 +59,10 @@ pub fn Chat() -> impl IntoView { // Handle sending messages let send_message = move |_| { - websocket.send(&to_string(&ChatMessage { text: chat_input() }).unwrap()); - chat_input.set(String::new()); + if chat_input() != "" { + websocket.send(&to_string(&ChatMessage { text: chat_input() }).unwrap()); + chat_input.set(String::new()); + } }; // Keep chat scrolled to the bottom @@ -74,51 +76,45 @@ pub fn Chat() -> impl IntoView { }); view! { -
-

Chat: {move || chat_name()}

- +
+
+

Chat: {move || chat_name()}

-
    -

    Users: {move || users().len()}

    - {move || users().into_iter().map(|n| view! {
  • {n}
  • }).collect_view()} -
- -
- +
- - - - - - + +
-
+
+
    +

    Users: {move || users().len()}

    + {move || { + users() + .into_iter() + .map(|n| { + view! { +
  • + + {n} +
  • + } + }) + .collect_view() + }} +
} } diff --git a/client/src/components/footer.rs b/client/src/components/footer.rs index 348421a..46afca8 100644 --- a/client/src/components/footer.rs +++ b/client/src/components/footer.rs @@ -1,21 +1,59 @@ +use crate::components::chat::*; +use crate::components::debug::*; use leptos::prelude::*; use thaw::*; #[component] pub fn Footer() -> impl IntoView { + let chat_open = RwSignal::new(false); + view! { +
+
+
+ + + + + +
-
- - "About" - - - "Contact" - +
+
+ + +
+
+ + "About" + + + "Contact" + +
+
+
} diff --git a/client/src/components/game/views/judging.rs b/client/src/components/game/views/judging.rs index 950a899..6b90b90 100644 --- a/client/src/components/game/views/judging.rs +++ b/client/src/components/game/views/judging.rs @@ -85,7 +85,7 @@ pub fn JudgingView() -> impl IntoView { }; view! { -
+
// Selected cards {move || { @@ -125,7 +125,7 @@ pub fn JudgingView() -> impl IntoView { .into_iter() .map(|group| { view! { -
+
{group .into_iter() .map(|card| { diff --git a/client/src/components/header.rs b/client/src/components/header.rs index 964ac3c..eeac617 100644 --- a/client/src/components/header.rs +++ b/client/src/components/header.rs @@ -16,12 +16,6 @@ pub fn Header() -> impl IntoView {
- - +
@@ -78,12 +78,8 @@ pub fn Home() -> impl IntoView { - - - - - - + +