From 8550cc32900b49af2f71bb315626e582f4a3d692 Mon Sep 17 00:00:00 2001 From: BakerNet Date: Sun, 6 Oct 2024 10:43:15 -0700 Subject: [PATCH 1/8] Early WIP --- web/src/app.rs | 1 + web/src/app/active.rs | 17 +++++++++++++++++ web/src/app/error_template.rs | 6 +++++- web/src/app/root.rs | 5 +++-- web/src/backend/game_manager.rs | 17 +++++++++++++++++ web/src/models/game.rs | 4 ++++ 6 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 web/src/app/active.rs diff --git a/web/src/app.rs b/web/src/app.rs index aa2a946..850ec6a 100644 --- a/web/src/app.rs +++ b/web/src/app.rs @@ -1,3 +1,4 @@ +mod active; mod auth; mod error_template; mod footer; diff --git a/web/src/app/active.rs b/web/src/app/active.rs new file mode 100644 index 0000000..362e0a1 --- /dev/null +++ b/web/src/app/active.rs @@ -0,0 +1,17 @@ +use leptos::prelude::*; + +#[component] +pub fn ActiveGames() -> impl IntoView { + view! { +
+

"Join Multiplayer Games"

+
+
Test
Test
Test
Test
Test
Test
Test
Test
Test
+
+

"Watch Active Games"

+
+
Test
Test
Test
Test
Test
Test
Test
Test
Test
+
+
+ } +} diff --git a/web/src/app/error_template.rs b/web/src/app/error_template.rs index 6cb3cb5..d4c4d51 100644 --- a/web/src/app/error_template.rs +++ b/web/src/app/error_template.rs @@ -59,7 +59,10 @@ pub fn ErrorTemplate( } view! { -

{if errors.len() > 1 { "Errors" } else { "Error" }}

+ +
+ +

{if errors.len() > 1 { "Errors" } else { "Error" }}

+
} } diff --git a/web/src/app/root.rs b/web/src/app/root.rs index 9ae3843..1928b08 100644 --- a/web/src/app/root.rs +++ b/web/src/app/root.rs @@ -3,7 +3,7 @@ use leptos_meta::*; use leptos_router::{components::*, path}; use crate::{ - app::footer::Footer, + app::{active::ActiveGames, footer::Footer}, components::info::{use_controls_info_keybinds, ControlsInfoButton, ControlsInfoModal}, }; @@ -20,7 +20,7 @@ use super::{ #[cfg(feature = "ssr")] pub fn shell(options: LeptosOptions) -> impl IntoView { view! { - + @@ -90,6 +90,7 @@ pub fn App() -> impl IntoView { +