diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-06-28 12:38:42 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-06-28 22:10:44 +0200 |
commit | 401a13ff9e7792f0e060ccfb15afdbd3bc5fc557 (patch) | |
tree | b96febaeaa3cc78bb5872be58c10bccc7a04d622 /views/profile.ejs | |
parent | dd165d03e95f252150a94fc27d0280551d7e041b (diff) | |
download | server-401a13ff9e7792f0e060ccfb15afdbd3bc5fc557.tar.gz |
Clean up SQL and use table views.
Diffstat (limited to 'views/profile.ejs')
-rw-r--r-- | views/profile.ejs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/views/profile.ejs b/views/profile.ejs index 02f6e72..7829870 100644 --- a/views/profile.ejs +++ b/views/profile.ejs @@ -36,7 +36,7 @@ Your mail address is <%= user.mail %>. <td><%= row.game_id %> <td class="nowrap"><a href="/info/<%= row.title_id %>"><%= row.title_name %></a> <td><%= row.scenario %> -<td><%= row.players.join(", ") %> +<td><%= row.player_names %> <td><%= row.description %> <td class="nowrap"><%= row.ctime %> <td><a href="/join/<%= row.game_id %>">Join</a> @@ -53,19 +53,19 @@ Your mail address is <%= user.mail %>. <td><%= row.game_id %> <td class="nowrap"><a href="/info/<%= row.title_id %>"><%= row.title_name %></a> <td><%= row.scenario %> -<td><%= row.players.join(", ") %> +<td><%= row.player_names %> <td><%= row.description %> <td class="nowrap"><%= row.mtime %> <% - if (row.your_turn) { - %><td class="your_turn"><%= row.active %><% + if (row.is_your_turn) { + %><td class="is_your_turn"><%= row.active_role %><% } else { - %><td><%= row.active %><% + %><td><%= row.active_role %><% } - if (row.players.reduce((n,p) => n + (p === user.name ? 1 : 0), 0) == 1) { - %><td><a href="/play/<%= row.game_id %>">Play</a><% + if (row.is_shared) { + %><td><a href="/join/<%= row.game_id %>">Enter</a><% } else { - %><td><a href="/join/<%= row.game_id %>">Play</a><% + %><td><a href="/play/<%= row.game_id %>">Play</a><% } %> <% }); %> @@ -81,7 +81,7 @@ Your mail address is <%= user.mail %>. <td><%= row.game_id %> <td class="nowrap"><a href="/info/<%= row.title_id %>"><%= row.title_name %></a> <td><%= row.scenario %> -<td><%= row.players.join(", ") %> +<td><%= row.player_names %> <td><%= row.description %> <td class="nowrap"><%= row.mtime %> <td><%= row.result %> |