From b37a28726ed6fa3d62264bd90606c9dbce9937e3 Mon Sep 17 00:00:00 2001 From: GreenAsJade Date: Fri, 22 Nov 2024 14:25:31 +1030 Subject: [PATCH] Put seek graph alongside create game on desktop screens --- src/views/Play/CustomGames.styl | 26 +++++- src/views/Play/CustomGames.tsx | 148 +++++++++++++++++--------------- 2 files changed, 101 insertions(+), 73 deletions(-) diff --git a/src/views/Play/CustomGames.styl b/src/views/Play/CustomGames.styl index 7a143e7df0..9b8e9b8362 100644 --- a/src/views/Play/CustomGames.styl +++ b/src/views/Play/CustomGames.styl @@ -15,7 +15,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ - + #CustomGames { display: flex; flex-direction: column; @@ -23,13 +23,35 @@ justify-content: center; box-sizing: border-box; + .top-stuff { + display: flex; + flex-direction: column; + + @media screen and (min-width: 850px){ + // On deskop, put the seek graph next to the CreateGame form + flex-direction: row; + width: max-content; // Causes seek graph to be as wide as possible + + .Card { + flex: 1; + } + } + .seek-graph{ + flex: 1; + display: flex; + flex-direction: column; + } + } + .Modal { border: none; box-shadow: none; } - + .ChallengeModal { width: 100%; max-height: unset; } + + } \ No newline at end of file diff --git a/src/views/Play/CustomGames.tsx b/src/views/Play/CustomGames.tsx index 4672aadb5d..6c43afb844 100644 --- a/src/views/Play/CustomGames.tsx +++ b/src/views/Play/CustomGames.tsx @@ -397,86 +397,92 @@ export function CustomGames(): JSX.Element { }} >
- - {liveOwnChallengePending() ? ( - <> -
{_("Waiting for opponent...")}
-
-
-
-
+
+ + {liveOwnChallengePending() ? ( + <> +
+ {_("Waiting for opponent...")}
-
-
- -
- - ) : live_rengo_challenge_to_show ? ( - <> - - +
+
+
+
+
+
+ +
+ + ) : live_rengo_challenge_to_show ? ( + <> + - setPaneLock(live_rengo_challenge_to_show.challenge_id, lock) - } + > + + setPaneLock( + live_rengo_challenge_to_show.challenge_id, + lock, + ) + } + /> + + + ) : ( +
+ void) => { + console.log("on", event, callback); + }, + off: (event: "open" | "close", callback: () => void) => { + console.log("off", event, callback); + }, + }} /> - - - ) : ( -
- void) => { - console.log("on", event, callback); - }, - off: (event: "open" | "close", callback: () => void) => { - console.log("off", event, callback); - }, - }} - /> +
+ )} + +
+

{pgettext("Games available to accept", "Available Games")}

+ +
+ +
- )} - -
-

{pgettext("Games available to accept", "Available Games")}

- -
- - -
- + +
-