diff --git a/web/src/app/minesweeper/players.rs b/web/src/app/minesweeper/players.rs
index f62c8f7..001d2ba 100644
--- a/web/src/app/minesweeper/players.rs
+++ b/web/src/app/minesweeper/players.rs
@@ -24,13 +24,13 @@ where
-
+ |
Player
|
-
+ |
Username
|
-
+ |
Score
|
@@ -170,8 +170,8 @@ fn PlayerRow(player_num: usize, player: Option) -> impl IntoView {
view! {
- {player_num} |
-
+ | {player_num} |
+
{username}
{if is_dead {
view! {
@@ -208,7 +208,7 @@ fn PlayerRow(player_num: usize, player: Option) -> impl IntoView {
}}
|
- {score} |
+ {score} |
}
}
diff --git a/web/src/app/profile.rs b/web/src/app/profile.rs
index a319574..0133b60 100644
--- a/web/src/app/profile.rs
+++ b/web/src/app/profile.rs
@@ -222,12 +222,26 @@ async fn get_player_games() -> Result, ServerFnError> {
#[component]
fn GameHistory() -> impl IntoView {
let player_games = create_resource(|| (), move |_| async { get_player_games().await });
+ let td_class = "border border-slate-100 dark:border-slate-700 p-1";
+ let loading_row = move |num: usize| {
+ let player_class = player_class(0) + " text-black";
+ view! {
+
+ Game {num} |
+ |
+ |
+ Loading... |
+ |
+ |
+
+ }
+ };
let game_view = move |game: PlayerGame| {
let player_class = player_class(game.player as usize) + " text-black";
view! {
-
+ |
impl IntoView {
{game.game_id}
|
- {game.start_time} |
- {game.game_mode.long_name()} |
- {game.game_time} |
-
+ | {game.start_time} |
+ {game.game_mode.long_name()} |
+ {game.game_time} |
+
{if game.dead {
view! {
@@ -274,7 +288,7 @@ fn GameHistory() -> impl IntoView {
}}
|
- {game.score} |
+ {game.score} |
}
};
@@ -283,28 +297,28 @@ fn GameHistory() -> impl IntoView {
-
+ |
Game
|
-
+ |
Date
|
-
+ |
Game Mode
|
-
+ |
Duration
|
-
+ |
Status
|
-
+ |
Score
|
-
+
{move || {
player_games