From 327acfe1124cdafc5eb460a039222a160f867ba3 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 17 Nov 2021 13:39:16 +0100 Subject: Simplify URL for playing games. --- views/games.ejs | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) (limited to 'views/games.ejs') diff --git a/views/games.ejs b/views/games.ejs index 3b3f485..86a2502 100644 --- a/views/games.ejs +++ b/views/games.ejs @@ -2,41 +2,49 @@

Open

-
IDTitleScenarioPlayersDescriptionCreated -<% if (open_games.length > 0) { %> -<% open_games.forEach((row) => { %> +
IDTitleScenarioOptionsPlayersDescriptionCreated +<%_ if (open_games.length > 0) { _%> +<%_ open_games.forEach((row) => { _%>
<%= row.game_id %> <%= row.title_name %> <%= row.scenario %> -<%- row.player_names || row.owner_name %> +<%- row.options %> +<%- row.player_names %> <%= row.description %> <%= row.ctime %> Join -<% }); } else { %> -
No open games. -<% } %> +<%_ }); } else { _%> +
No open games. +<%_ } _%>

Active

-
IDTitleScenarioPlayersDescriptionChangedActive -<% if (active_games.length > 0) { %> -<% active_games.forEach((row) => { %> +
IDTitleScenarioOptionsPlayersDescriptionChangedActive +<%_ if (active_games.length > 0) { _%> +<%_ active_games.forEach((row) => { _%>
<%= row.game_id %> <%= row.title_name %> <%= row.scenario %> +<%- row.options %> <%- row.player_names %> <%= row.description %> <%= row.mtime %> "><%= row.active %> -<% if (row.is_yours) { %> -Enter -<% } else { %> -View -<% } %> -<% }); } else { %> -
No active games. -<% } %> +<%_ + if (row.is_yours) { + if (row.is_shared) { + %>View<% + } else { + %>View<% + } + } else { + %>View<% + } +_%> +<%_ }); } else { _%> +
No active games. +<%_ } _%>
-- cgit v1.2.3