From 0d0dab23fb0ecf16a2abf54295746d7dbd87c2d7 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 10 Nov 2021 22:27:46 +0100 Subject: Massive SQL cleanup. --- views/profile.ejs | 85 +++++++++++++++++++++++++++---------------------------- 1 file changed, 41 insertions(+), 44 deletions(-) (limited to 'views/profile.ejs') diff --git a/views/profile.ejs b/views/profile.ejs index 3c49014..1dbc1f5 100644 --- a/views/profile.ejs +++ b/views/profile.ejs @@ -1,10 +1,5 @@ <%- include('header', { title: "Rally the Troops!", refresh: (active_games.length > 0 ? 300 : 0) }) %> - - - +

Welcome, <%= user.name %>!

@@ -12,60 +7,62 @@ Your mail address is <%= user.mail %>.
-

+
» +Change +password, +mail address, +name, +or profile text. +
» +Logout <% if (open_games.length > 0) { %>

Open Games

- +
-
IDGameScenarioPlayersDescriptionCreated <% open_games.forEach((row) => { %>
<%= row.game_id %> -<%= row.title_name %> -<%= row.scenario %> -<%- row.player_names %> -<%= row.description %> -<%= row.ctime %> -Join +<%= row.game_id %> +<%= row.title_name %> +<%= row.scenario %> +<%- row.player_names %> +<%= row.description %> +<%= row.ctime %> +Join <% }); %>
<% } %> <% if (active_games.length > 0) { %>

Active Games

- +
-
IDGameScenarioPlayersDescriptionChangedTurn <% active_games.forEach((row) => { %>
<%= row.game_id %> -<%= row.title_name %> -<%= row.scenario %> -<%- row.player_names %> -<%= row.description %> -<%= row.mtime %> +<%= row.game_id %> +<%= row.title_name %> +<%= row.scenario %> +<%- row.player_names %> +<%= row.description %> +<%= row.mtime %> <% - if (row.is_your_turn) { - %><%= row.active_role %><% + if (row.is_active) { + %><%= row.active %><% } else { - %><%= row.active_role %><% + %><%= row.active %><% } if (row.is_shared) { - %>Enter<% + %>Enter<% } else { - %>Play<% + %>Play<% } %> <% }); %> @@ -74,18 +71,18 @@ Your mail address is <%= user.mail %>. <% if (finished_games.length > 0) { %>

Finished Games

- +
-
IDGameScenarioPlayersDescriptionFinishedResult <% finished_games.forEach((row) => { %>
<%= row.game_id %> -<%= row.title_name %> -<%= row.scenario %> -<%- row.player_names %> -<%= row.description %> -<%= row.mtime %> -<%= row.result %> -View +<%= row.game_id %> +<%= row.title_name %> +<%= row.scenario %> +<%- row.player_names %> +<%= row.description %> +<%= row.mtime %> +<%= row.result %> +View <% }); %>
<% } %> -- cgit v1.2.3